xfs-masters
[Top] [All Lists]

[Bug 804] New: xfsdump doesn't properly check system() return value in

To: xfs-masters@xxxxxxxxxxx
Subject: [Bug 804] New: xfsdump doesn't properly check system() return value in save_quotas()
From: bugzilla-daemon@xxxxxxxxxxx
Date: Sun, 7 Dec 2008 12:11:29 -0600
http://oss.sgi.com/bugzilla/show_bug.cgi?id=804

           Summary: xfsdump doesn't properly check system() return value in
                    save_quotas()
           Product: Linux XFS
           Version: Current
          Platform: PC
               URL: http://pastebin.com/f72b74c56
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: xfsdump
        AssignedTo: xfs-masters@xxxxxxxxxxx
        ReportedBy: sandeen-xfs@xxxxxxxxxxx


>From a user report:

xfsdump: saving user quota information for: /mnt/raid
xfsdump: ERROR: xfs_quota failed with exit status: 32512
xfsdump: ERROR: failed to save user quota information, continuing

save_quotas() does:

        sts = system( buf );
        if( sts != 0 ) {
            mlog( MLOG_ERROR, _(
                  "%s failed with exit status: %d\n"), REPQUOTA, sts);
            return BOOL_FALSE;
        }

but, the manpage for system(3) says:

RETURN VALUE
       The value returned is -1 on error (e.g.  fork() failed), and the return
       status  of  the command otherwise.  This latter return status is in the
       format specified in wait(2).  Thus, the exit code of the  command  will
       be  WEXITSTATUS(status).   In  case  /bin/sh could not be executed, the
       exit status will be that of a command that does exit(127).

so we should probably be using those macros to check return values (see wait(2))

In the case above, WEXITSTATUS(32512) is "127" which is the special value above,
so still not sure what is going on in that particular case.

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

<Prev in Thread] Current Thread [Next in Thread>
  • [Bug 804] New: xfsdump doesn't properly check system() return value in save_quotas(), bugzilla-daemon <=