Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 719
b: refs/heads/master
c: 9a3bb30
h: refs/heads/master
i:
  717: 93d87eb
  715: 0e71d9c
  711: 7ba6fc0
  703: ba53a08
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed May 1, 2005
1 parent 7ff5cb9 commit 6f5867a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a83f1fe27f7252a2b73b4f22066e92bf99bd595b
refs/heads/master: 9a3bb3017383fbb6fe56431d17f60bd0d50f0717
21 changes: 14 additions & 7 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,12 +889,18 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
char * p;

p = NULL;
/* "resize=NNN" */
*blocks = simple_strtoul (arg, &p, 0);
if (*p != '\0') {
/* NNN does not look like a number */
reiserfs_warning (s, "reiserfs_parse_options: bad value %s", arg);
return 0;
/* "resize=NNN" or "resize=auto" */

if (!strcmp(arg, "auto")) {
/* From JFS code, to auto-get the size.*/
*blocks = s->s_bdev->bd_inode->i_size >> s->s_blocksize_bits;
} else {
*blocks = simple_strtoul (arg, &p, 0);
if (*p != '\0') {
/* NNN does not look like a number */
reiserfs_warning (s, "reiserfs_parse_options: bad value %s", arg);
return 0;
}
}
}

Expand All @@ -903,7 +909,8 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
unsigned long val = simple_strtoul (arg, &p, 0);
/* commit=NNN (time in seconds) */
if ( *p != '\0' || val >= (unsigned int)-1) {
reiserfs_warning (s, "reiserfs_parse_options: bad value %s", arg); return 0;
reiserfs_warning (s, "reiserfs_parse_options: bad value %s", arg);
return 0;
}
*commit_max_age = (unsigned int)val;
}
Expand Down

0 comments on commit 6f5867a

Please sign in to comment.