util.c (string_to_inode): Use strtoul instead of atoi, so that hex
inode numbers will be accepted.
+2000-08-23 <tytso@valinux.com>
+
+ * util.c (string_to_inode): Use strtoul instead of atoi, so that
+ hex inode numbers will be accepted.
+
2000-08-19 <tytso@valinux.com>
* util.c (open_pager): Set SIGPIPE to be ignored, so that quitting
{
ino_t ino;
int len = strlen(str);
- int i;
+ char *end;
int retval;
/*
* inode number.
*/
if ((len > 2) && (str[0] == '<') && (str[len-1] == '>')) {
- for (i = 1; i < len-1; i++)
- if (!isdigit(str[i]))
- break;
- if (i == len-1)
- return(atoi(str+1));
+ ino = strtoul(str+1, &end, 0);
+ if (*end=='>')
+ return ino;
}
retval = ext2fs_namei(current_fs, root, cwd, str, &ino);