~vorlon/ubuntu/natty/e2fsprogs/multiarch

« back to all changes in this revision

Viewing changes to lib/ext2fs/mkjournal.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2009-08-25 18:34:46 UTC
  • mfrom: (8.2.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090825183446-p2iuz63g8g4ytlf4
Tags: 1.41.9-1ubuntu1
* Merge from Debian, remaining changes:
  - Do not build-depend on dietlibc-dev, which is universe.
  - Do now allow pkg-create-dbgsym to operate on this package.
  - Use external libblkid and libuuid from util-linux, rather than
    building our own.
  - Do not include /etc/e2fsck.conf and remove on upgrade.

* Included a couple of extra revisions from GIT maint:
  - (ffd8078) e2freefrag: Update manpage to include e2fsprogs version
    and release date
  - (31b5a2b) mke2fs.conf: Use the feature name "extent" instead of
    "extents"
  - (8bafedb) tune2fs: Fix "tune2fs -j <dev>" for extent-enabled
     filesystems.  LP: #416648.

Show diffs side-by-side

added added

removed removed

Lines of Context:
494
494
                        goto errout;
495
495
 
496
496
                /* Get inode number of the journal file */
497
 
                if (fstat(fd, &st) < 0)
 
497
                if (fstat(fd, &st) < 0) {
 
498
                        retval = errno;
498
499
                        goto errout;
 
500
                }
499
501
 
500
502
#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
501
503
                retval = fchflags (fd, UF_NODUMP|UF_IMMUTABLE);
502
504
#else
503
505
#if HAVE_EXT2_IOCTLS
504
 
                f = EXT2_NODUMP_FL | EXT2_IMMUTABLE_FL;
 
506
                if (ioctl(fd, EXT2_IOC_GETFLAGS, &f) < 0) {
 
507
                        retval = errno;
 
508
                        goto errout;
 
509
                }
 
510
                f |= EXT2_NODUMP_FL | EXT2_IMMUTABLE_FL;
505
511
                retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f);
506
512
#endif
507
513
#endif
508
 
                if (retval)
 
514
                if (retval) {
 
515
                        retval = errno;
509
516
                        goto errout;
 
517
                }
510
518
 
511
 
                close(fd);
 
519
                if (close(fd) < 0) {
 
520
                        retval = errno;
 
521
                        fd = -1;
 
522
                        goto errout;
 
523
                }
512
524
                journal_ino = st.st_ino;
513
525
        } else {
514
526
                if ((mount_flags & EXT2_MF_BUSY) &&