// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cdromutl.cc,v 1.7 1999/07/02 22:21:01 jgg Exp $
+// $Id: cdromutl.cc,v 1.9 1999/08/30 07:48:04 jgg Exp $
/* ######################################################################
CDROM Utilities - Some functions to manipulate CDROM mounts.
}
// Wait for mount
- int Status = 0;
- while (waitpid(Child,&Status,0) != Child)
- {
- if (errno == EINTR)
- continue;
- return _error->Errno("waitpid","Couldn't wait for subprocess");
- }
-
- // Check for an error code.
- if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
- return false;
- return true;
+ return ExecWait(Child,"mount",true);
}
/*}}}*/
// MountCdrom - Mount a cdrom /*{{{*/
}
// Wait for mount
- int Status = 0;
- while (waitpid(Child,&Status,0) != Child)
- {
- if (errno == EINTR)
- continue;
- return _error->Errno("waitpid","Couldn't wait for subprocess");
- }
-
- // Check for an error code.
- if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
- return false;
- return true;
+ return ExecWait(Child,"mount",true);
}
/*}}}*/
// IdentCdrom - Generate a unique string for this CD /*{{{*/
if (Version <= 1)
{
- sprintf(S,"%lu",Dir->d_ino);
+ sprintf(S,"%lu",(unsigned long)Dir->d_ino);
}
else
{