Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/libefi/devicename.c
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
efi_setcurrdev(struct env_var *ev, int flags, const void *value) | efi_setcurrdev(struct env_var *ev, int flags, const void *value) | ||||
{ | { | ||||
struct devdesc *ncurr; | struct devdesc *ncurr; | ||||
int rv; | int rv; | ||||
rv = efi_parsedev(&ncurr, value, NULL); | rv = efi_parsedev(&ncurr, value, NULL); | ||||
if (rv != 0) | if (rv != 0) | ||||
return (rv); | return (rv); | ||||
free(ncurr); | free(ncurr); | ||||
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); | |||||
return (0); | return (mount_currdev(ev, flags, value)); | ||||
} | } | ||||
imp: I'd make this a function because it's repeated a bunch of times. | |||||
Done Inline ActionsWhen you make this a function, I'd suggest "Note we unmount any previously mounted fs only after successfully mounting the new because..." might be a better comment... imp: When you make this a function, I'd suggest "Note we unmount any previously mounted fs only… |
I'd make this a function because it's repeated a bunch of times.