diff options
author | Matt Kraai <kraai@debian.org> | 2000-09-13 02:46:14 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-09-13 02:46:14 +0000 |
commit | 322ae93a5e0b78b65831f9fd87fd456eb84d21a1 (patch) | |
tree | 5b967e1d873ff6eff8296bf9fda73825f0c55884 /mount.c | |
parent | b89075298edf0a471b9046b1f3c8a936e18ead20 (diff) |
Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
segfaulting or handling errors the same way themselves.
Diffstat (limited to 'mount.c')
-rw-r--r-- | mount.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -273,7 +273,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, numfilesystems = ioctl (fd, DEVMTAB_COUNT_FILESYSTEMS); if (numfilesystems<0) fatalError("\nDEVMTAB_COUNT_FILESYSTEMS: %s\n", strerror (errno)); - fslist = (struct k_fstype *) calloc ( numfilesystems, sizeof(struct k_fstype)); + fslist = (struct k_fstype *) xcalloc ( numfilesystems, sizeof(struct k_fstype)); /* Grab the list of available filesystems */ status = ioctl (fd, DEVMTAB_GET_FILESYSTEMS, fslist); @@ -343,7 +343,7 @@ extern int mount_main(int argc, char **argv) numfilesystems = ioctl (fd, DEVMTAB_COUNT_MOUNTS); if (numfilesystems<0) fatalError( "\nDEVMTAB_COUNT_MOUNTS: %s\n", strerror (errno)); - mntentlist = (struct k_mntent *) calloc ( numfilesystems, sizeof(struct k_mntent)); + mntentlist = (struct k_mntent *) xcalloc ( numfilesystems, sizeof(struct k_mntent)); /* Grab the list of mounted filesystems */ if (ioctl (fd, DEVMTAB_GET_MOUNTS, mntentlist)<0) |