"-o lustre:ctime=%llu "
"-o lustre:mtime=%llu ",
PRSH(si, st), PZFS(st), fsname,
- SNAPSHOT_MAGIC, xtime, xtime);
+ SNAPSHOT_MAGIC,
+ (unsigned long long)xtime,
+ (unsigned long long)xtime);
if (len <= 0)
exit(-EOVERFLOW);
PRSH(si, st), PIMPORT(st), PZFS(st),
PSSNAME(si, st), PSS_NEW(si, st),
PZFS(st), si->si_comment,
- PSS_NEW(si, st), PZFS(st), xtime,
+ PSS_NEW(si, st), PZFS(st),
+ (unsigned long long)xtime,
PSS_NEW(si, st));
else if (si->si_new_ssname)
snprintf(cmd, sizeof(cmd) - 1,
" set lustre:mtime=%llu "DSSNAME"'",
PRSH(si, st), PIMPORT(st), PZFS(st),
PSSNAME(si, st), PSS_NEW(si, st),
- PZFS(st), xtime, PSS_NEW(si, st));
+ PZFS(st), (unsigned long long)xtime,
+ PSS_NEW(si, st));
else if (si->si_comment)
snprintf(cmd, sizeof(cmd) - 1,
DRSH" '"DIMPORT"; "DZFS
" set lustre:mtime=%llu "DSSNAME"'",
PRSH(si, st), PIMPORT(st), PZFS(st),
si->si_comment, PSSNAME(si, st),
- PZFS(st), xtime, PSSNAME(si, st));
+ PZFS(st), (unsigned long long)xtime,
+ PSSNAME(si, st));
else
exit(-EINVAL);
strlen("lustre:ctime")) == 0) {
ptr = snapshot_first_skip_blank(buf);
if (ptr) {
- sscanf(ptr, "%llu", &xtime);
+ xtime = (__u64)strtoull(ptr, NULL, 10);
printf("create_time: %s",
ctime((time_t *)&xtime));
}
strlen("lustre:mtime")) == 0) {
ptr = snapshot_first_skip_blank(buf);
if (ptr) {
- sscanf(ptr, "%llu", &xtime);
+ xtime = (__u64)strtoull(ptr, NULL, 10);
printf("modify_time: %s",
ctime((time_t *)&xtime));
}