logo       

[SSI] openssi/e2fsprogs/misc fsck.c,1.2.2.5,1.2.2.6: msg#00117

Subject: [SSI] openssi/e2fsprogs/misc fsck.c,1.2.2.5,1.2.2.6
Update of /cvsroot/ssic-linux/openssi/e2fsprogs/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5832/e2fsprogs/misc

Modified Files:
      Tag: OPENSSI-RH
        fsck.c 
Log Message:
Sync w/ FC branch


Index: fsck.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/e2fsprogs/misc/Attic/fsck.c,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -u -d -r1.2.2.5 -r1.2.2.6
--- fsck.c      5 May 2004 19:40:08 -0000       1.2.2.5
+++ fsck.c      12 Nov 2004 00:58:53 -0000      1.2.2.6
@@ -170,7 +170,7 @@
        return;
 }
 
-static int parse_fstab_line(char *line, struct fs_info **ret_fs)
+static int parse_fstab_line(char *line, struct fs_info **ret_fs, int localonly)
 {
        char    *device, *mntpnt, *type, *opts, *freq, *passno, *cp;
        struct fs_info *fs;
@@ -194,6 +194,10 @@
        if (!mntpnt || !type)
                return -1;
        
+       if(localonly && !ssi_thisnode_entry(opts)) {
+               return 0;
+       }
+
        if (!(fs = malloc(sizeof(struct fs_info))))
                return -1;
 
@@ -290,21 +294,13 @@
                if (!fgets(buf, sizeof(buf), f))
                        break;
                buf[sizeof(buf)-1] = 0;
-               if (parse_fstab_line(buf, &fs) < 0) {
+               if (parse_fstab_line(buf, &fs, localonly) < 0) {
                        fprintf(stderr, _("WARNING: bad format "
                                "on line %d of %s\n"), lineno, filename);
                        continue;
                }
                if (!fs)
                        continue;
-               if(localonly && !ssi_thisnode_entry(fs->opts)) {
-                       free(fs->device);
-                       free(fs->mountpt);
-                       free(fs->type); 
-                       free(fs->opts);
-                       free(fs);
-                       continue;
-               }
                fs->lockfd = -1;
                if (!filesys_info)
                        filesys_info = fs;
@@ -351,7 +347,7 @@
                        break;
                buf[sizeof(buf)-1] = 0;
                /* Can use parse_fstab_line() to process mtab entries too */
-               if (parse_fstab_line(buf, &me) < 0) {
+               if (parse_fstab_line(buf, &me, 0) < 0) {
                        fprintf(stderr, _("WARNING: bad format "
                                "on line %d of %s\n"), lineno, MTAB);
                        continue;



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe