mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
Revert "stand: Use calloc instead of malloc for initialization of filesystem devsw"
This reverts commit dfafdbdfc3. There's no
author, and also problems with it. I'll redo it.
Sponsored by: Netflix
This commit is contained in:
parent
8ebb3de0c9
commit
dd747d7bcb
6 changed files with 6 additions and 6 deletions
|
|
@ -468,7 +468,7 @@ disk_parsedev(struct devdesc **idev, const char *devspec, const char **path)
|
|||
|
||||
if (*cp != '\0' && *cp != ':')
|
||||
return (EINVAL);
|
||||
dev = calloc(sizeof(*dev), 1);
|
||||
dev = malloc(sizeof(*dev));
|
||||
if (dev == NULL)
|
||||
return (ENOMEM);
|
||||
dev->dd.d_unit = unit;
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ hostdisk_parsedev(struct devdesc **idev, const char *devspec, const char **path)
|
|||
return (EINVAL);
|
||||
}
|
||||
free(fn);
|
||||
dev = calloc(sizeof(*dev), 1);
|
||||
dev = malloc(sizeof(*dev));
|
||||
if (dev == NULL)
|
||||
return (ENOMEM);
|
||||
dev->d_unit = 0;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path
|
|||
|
||||
if (ofw_path_to_handle(devspec, ofwtype, &rem_path) == -1)
|
||||
return (ENOENT);
|
||||
idev = calloc(sizeof(struct ofw_devdesc), 1);
|
||||
idev = malloc(sizeof(struct ofw_devdesc));
|
||||
if (idev == NULL) {
|
||||
printf("ofw_parsedev: malloc failed\n");
|
||||
return (ENOMEM);
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ default_parsedev(struct devdesc **dev, const char *devspec,
|
|||
int unit, err;
|
||||
char *cp;
|
||||
|
||||
idev = calloc(sizeof(struct devdesc), 1);
|
||||
idev = malloc(sizeof(struct devdesc));
|
||||
if (idev == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
|
|
|
|||
|
|
@ -1643,7 +1643,7 @@ zfs_parsedev(struct devdesc **idev, const char *devspec, const char **path)
|
|||
spa = spa_find_by_name(poolname);
|
||||
if (!spa)
|
||||
return (ENXIO);
|
||||
dev = calloc(sizeof(*dev), 1);
|
||||
dev = malloc(sizeof(*dev));
|
||||
if (dev == NULL)
|
||||
return (ENOMEM);
|
||||
dev->pool_guid = spa->spa_guid;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ uboot_parsedev(struct uboot_devdesc **dev, const char *devspec,
|
|||
}
|
||||
if (dv == NULL)
|
||||
return(ENOENT);
|
||||
idev = calloc(sizeof(struct uboot_devdesc), 1);
|
||||
idev = malloc(sizeof(struct uboot_devdesc));
|
||||
err = 0;
|
||||
np = (devspec + strlen(dv->dv_name));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue