Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/partedit/gpart_ops.c
Show First 20 Lines • Show All 701 Lines • ▼ Show 20 Lines | if (newfs != NULL && newfs[0] != '\0') { | ||||
sprintf(md->newfs, "%s /dev/%s", newfs, name); | sprintf(md->newfs, "%s /dev/%s", newfs, name); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
if (strcmp(type, "freebsd-swap") == 0) | if (strcmp(type, "freebsd-swap") == 0) | ||||
mountpoint = "none"; | mountpoint = "none"; | ||||
if (strcmp(type, bootpart_type(scheme, &default_bootmount)) == 0) { | if (strcmp(type, bootpart_type(scheme, &default_bootmount)) == 0) { | ||||
if (default_bootmount == NULL) { | if (default_bootmount == NULL) | ||||
int fd = openat(tmpdfd, "bsdinstall-esps", | |||||
O_CREAT | O_WRONLY | O_APPEND, 0600); | |||||
if (fd > 0) { | |||||
write(fd, md->name, strlen(md->name)); | |||||
write(fd, "\n", 1); | |||||
close(fd); | |||||
} | |||||
md->bootcode = 1; | md->bootcode = 1; | ||||
} | |||||
else if (mountpoint == NULL || strlen(mountpoint) == 0) | else if (mountpoint == NULL || strlen(mountpoint) == 0) | ||||
mountpoint = default_bootmount; | mountpoint = default_bootmount; | ||||
} | } | ||||
if (mountpoint == NULL || mountpoint[0] == '\0') { | if (mountpoint == NULL || mountpoint[0] == '\0') { | ||||
if (md->fstab != NULL) { | if (md->fstab != NULL) { | ||||
free(md->fstab->fs_spec); | free(md->fstab->fs_spec); | ||||
free(md->fstab->fs_file); | free(md->fstab->fs_file); | ||||
▲ Show 20 Lines • Show All 741 Lines • Show Last 20 Lines |