Debugfs will now interpret date strings of the form @123 as 123
seconds after the start of the epoch. This is handy when editing an
orphan inode linked list using the inode's deletion time field.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
if (strcmp(arg, "now") == 0) {
return time(0);
}
+ if (arg[0] == '@') {
+ /* interpret it as an integer */
+ ret = strtoul(arg+1, &tmp, 0);
+ if (*tmp)
+ return ((time_t) -1);
+ return ret;
+ }
memset(&ts, 0, sizeof(ts));
#ifdef HAVE_STRPTIME
strptime(arg, "%Y%m%d%H%M%S", &ts);