~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to misc/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2008-08-08 20:32:11 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080808203211-w72lpsd9q7o3bw6x
Tags: 1.41.0-3ubuntu1
* Merge from Debian unstable (LP: #254152, #246461), remaining changes:
  - Do not build-depend on dietlibc-dev, which is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        fflush(stderr);
72
72
        fputs(_("Proceed anyway? (y,n) "), stdout);
73
73
        buf[0] = 0;
74
 
        fgets(buf, sizeof(buf), stdin);
75
 
        if (strchr(short_yes, buf[0]) == 0)
 
74
        if (!fgets(buf, sizeof(buf), stdin) ||
 
75
            strchr(short_yes, buf[0]) == 0)
76
76
                exit(1);
77
77
}
78
78
 
249
249
 * in the filesystem.  For very small filesystems, it is not reasonable to
250
250
 * have a journal that fills more than half of the filesystem.
251
251
 */
252
 
int figure_journal_size(int size, ext2_filsys fs)
 
252
unsigned int figure_journal_size(int size, ext2_filsys fs)
253
253
{
254
254
        int j_blocks;
255
255
 
269
269
                                j_blocks);
270
270
                        exit(1);
271
271
                }
272
 
                if (j_blocks > fs->super->s_free_blocks_count / 2) {
 
272
                if ((unsigned) j_blocks > fs->super->s_free_blocks_count / 2) {
273
273
                        fputs(_("\nJournal size too big for filesystem.\n"),
274
274
                              stderr);
275
275
                        exit(1);