char runfile[(checkParams(argc,argv),strlen(argv[1])) + sizeof("/run.rev/99999")];
char dstfile[PATH_MAX];
int fd;
- char buf[6];
- ctx_t ctx;
+ char buf[sizeof(int)*3+2];
+ xid_t ctx;
ssize_t len;
ssize_t len1 = strlen(argv[1]);
strcpy(runfile, argv[1]);
strcpy(runfile+len1, "/run");
- ctx=Evc_X_getctx(0);
+ ctx=Evc_get_task_xid(0);
if (ctx==0) {
WRITE_MSG(2, "save_ctxinfo: Can not operate in context 0\n");
}
Ereadlink(runfile, dstfile, sizeof(dstfile));
- len = utilvserver_uint2str(buf, sizeof(buf), ctx, 10);
+ len = utilvserver_fmt_uint(buf, ctx);
fd = Eopen(dstfile, O_EXCL|O_CREAT|O_WRONLY, 0644);
if (write(fd, buf, len) !=len ||