From: Theodore Ts'o Date: Tue, 21 Jan 2014 05:59:03 +0000 (-0500) Subject: e2fsck, mke2fs: enable octal integers in the profile/config file X-Git-Tag: v1.42.9.wc1~77 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a9d7fc69b6b0ef5ce02af387c8886fd9e56b463e;p=tools%2Fe2fsprogs.git e2fsck, mke2fs: enable octal integers in the profile/config file If an integer in the config file starts with a 0, interpret it as an octal number. Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/profile.c b/e2fsck/profile.c index 9cfab37..c4528c8 100644 --- a/e2fsck/profile.c +++ b/e2fsck/profile.c @@ -1545,7 +1545,7 @@ profile_get_integer(profile_t profile, const char *name, const char *subname, /* Empty string is no good. */ return PROF_BAD_INTEGER; errno = 0; - ret_long = strtol (value, &end_value, 10); + ret_long = strtol(value, &end_value, 0); /* Overflow or underflow. */ if ((ret_long == LONG_MIN || ret_long == LONG_MAX) && errno != 0) @@ -1587,7 +1587,7 @@ profile_get_uint(profile_t profile, const char *name, const char *subname, /* Empty string is no good. */ return PROF_BAD_INTEGER; errno = 0; - ret_long = strtoul (value, &end_value, 10); + ret_long = strtoul(value, &end_value, 0); /* Overflow or underflow. */ if ((ret_long == ULONG_MAX) && errno != 0)