devicename.c (1e7a2eb93a527a2f4b22be66788caf50e4ba1f89) devicename.c (17276525fa1a28028f7ca423f365d5081cbe9a97)
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * Copyright (c) 2006 Marcel Moolenaar
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 97 unchanged lines hidden (view full) ---

106 idev = NULL;
107 err = 0;
108
109 switch (dv->dv_type) {
110 case DEVT_NONE:
111 break;
112
113 case DEVT_DISK:
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * Copyright (c) 2006 Marcel Moolenaar
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 97 unchanged lines hidden (view full) ---

106 idev = NULL;
107 err = 0;
108
109 switch (dv->dv_type) {
110 case DEVT_NONE:
111 break;
112
113 case DEVT_DISK:
114 idev = malloc(sizeof(struct disk_devdesc));
115 if (idev == NULL)
116 return (ENOMEM);
117
118 err = disk_parsedev((struct disk_devdesc *)idev, np, path);
114 err = disk_parsedev(&idev, np, path);
119 if (err != 0)
120 goto fail;
121 break;
122
123#ifdef EFI_ZFS_BOOT
124 case DEVT_ZFS:
125 idev = malloc(sizeof(struct zfs_devdesc));
126 if (idev == NULL)

--- 63 unchanged lines hidden ---
115 if (err != 0)
116 goto fail;
117 break;
118
119#ifdef EFI_ZFS_BOOT
120 case DEVT_ZFS:
121 idev = malloc(sizeof(struct zfs_devdesc));
122 if (idev == NULL)

--- 63 unchanged lines hidden ---