version 1.8.2.6, 2022/02/02 04:25:36 |
version 1.8.2.7, 2022/02/14 06:45:34 |
Line 527 target_mount(const char *opts, const cha |
|
Line 527 target_mount(const char *opts, const cha |
|
return target_mount_do(opts, from, on); |
return target_mount_do(opts, from, on); |
} |
} |
|
|
|
int |
|
target_unmount(const char *mount_point) |
|
{ |
|
struct unwind_mount *m, *prev = NULL; |
|
int error; |
|
|
|
for (m = unwind_mountlist; m != NULL; prev = m, m = m->um_prev) |
|
if (strcmp(m->um_mountpoint, mount_point) == 0) |
|
break; |
|
|
|
if (m == NULL) |
|
return ENOTDIR; |
|
|
|
error = run_program(0, "/sbin/umount %s%s", |
|
target_prefix(), m->um_mountpoint); |
|
if (error) |
|
return error; |
|
|
|
if (m == unwind_mountlist) |
|
unwind_mountlist = m->um_prev; |
|
else |
|
prev->um_prev = m->um_prev; |
|
free(m); |
|
|
|
return 0; |
|
} |
|
|
static bool |
static bool |
delete_wedge(const char *disk, const char *wedge) |
delete_wedge(const char *disk, const char *wedge) |
{ |
{ |