From ddc1d8d08eaff6c71c6062654ddd9d8981799ae9 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:54:23 +0000 Subject: Minor cleanups, fix for checksum lowercase bug Author: jgg Date: 1999-07-26 17:46:07 GMT Minor cleanups, fix for checksum lowercase bug --- apt-pkg/contrib/cdromutl.cc | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'apt-pkg/contrib/cdromutl.cc') diff --git a/apt-pkg/contrib/cdromutl.cc b/apt-pkg/contrib/cdromutl.cc index 7f79e878a..cd8a77aa0 100644 --- a/apt-pkg/contrib/cdromutl.cc +++ b/apt-pkg/contrib/cdromutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cdromutl.cc,v 1.7 1999/07/02 22:21:01 jgg Exp $ +// $Id: cdromutl.cc,v 1.8 1999/07/26 17:46:08 jgg Exp $ /* ###################################################################### CDROM Utilities - Some functions to manipulate CDROM mounts. @@ -93,18 +93,7 @@ bool UnmountCdrom(string Path) } // 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 /*{{{*/ @@ -142,18 +131,7 @@ bool MountCdrom(string Path) } // 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 /*{{{*/ -- cgit v1.2.3