diff options
author | Warner Losh <imp@FreeBSD.org> | 2022-11-30 22:08:22 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2022-11-30 22:30:31 +0000 |
commit | ba11bc368e612e7c5bbc195830a280f8af73ce18 (patch) | |
tree | 8b828468ce8b64dda01751311c0f82cf052a969d /stand/i386/libi386/devicename.c | |
parent | 17276525fa1a28028f7ca423f365d5081cbe9a97 (diff) | |
download | src-ba11bc368e612e7c5bbc195830a280f8af73ce18.tar.gz src-ba11bc368e612e7c5bbc195830a280f8af73ce18.zip |
stand: Change zfs_parsedev() API
Change the first argument to zfs_parsedev() to be a pointer to a struct
devdesc *. This now gets filled in with a malloc'd structure that's
returned to the caller that the caller is repsonsible for freeing. Most
nplaces in the tree passed in a malloc'd pointer anyway, and this moves
knowledge of zfs_devdesc more firmly into the zfs.c code.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37336
Diffstat (limited to 'stand/i386/libi386/devicename.c')
-rw-r--r-- | stand/i386/libi386/devicename.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/stand/i386/libi386/devicename.c b/stand/i386/libi386/devicename.c index 9ac4c9742593..1d7e4c7d3fa3 100644 --- a/stand/i386/libi386/devicename.c +++ b/stand/i386/libi386/devicename.c @@ -119,11 +119,7 @@ i386_parsedev(struct i386_devdesc **dev, const char *devspec, const char **path) break; case DEVT_ZFS: - idev = malloc(sizeof (struct zfs_devdesc)); - if (idev == NULL) - return (ENOMEM); - - err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); + err = zfs_parsedev((struct devdesc **)&idev, np, path); if (err != 0) goto fail; break; |