Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/makefs/mtree.c
Show First 20 Lines • Show All 638 Lines • ▼ Show 20 Lines | case 't': | ||||
*p++ = '\0'; | *p++ = '\0'; | ||||
error = read_number(value, 10, &num, 0, | error = read_number(value, 10, &num, 0, | ||||
INTMAX_MAX); | INTMAX_MAX); | ||||
if (error) | if (error) | ||||
break; | break; | ||||
st->st_atime = num; | st->st_atime = num; | ||||
st->st_ctime = num; | st->st_ctime = num; | ||||
st->st_mtime = num; | st->st_mtime = num; | ||||
#if HAVE_STRUCT_STAT_ST_MTIMENSEC | |||||
if (p == NULL) | if (p == NULL) | ||||
break; | break; | ||||
error = read_number(p, 10, &num, 0, | error = read_number(p, 10, &num, 0, | ||||
INTMAX_MAX); | INTMAX_MAX); | ||||
if (error) | if (error) | ||||
break; | break; | ||||
if (num != 0) | st->st_atimensec = num; | ||||
error = EINVAL; | st->st_ctimensec = num; | ||||
st->st_mtimensec = num; | |||||
#endif | |||||
} else if (strcmp(keyword, "type") == 0) { | } else if (strcmp(keyword, "type") == 0) { | ||||
if (value == NULL) { | if (value == NULL) { | ||||
error = ENOATTR; | error = ENOATTR; | ||||
break; | break; | ||||
} | } | ||||
if (strcmp(value, "dir") == 0) | if (strcmp(value, "dir") == 0) | ||||
node->type = S_IFDIR; | node->type = S_IFDIR; | ||||
else if (strcmp(value, "file") == 0) | else if (strcmp(value, "file") == 0) | ||||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |