Add sysinstall(8) tip for selecting devices in disked(8).
This commit is contained in:
parent
a90d4dbf23
commit
ac37d66a93
|
@ -186,6 +186,11 @@ bool check_lacking_partition_table(void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool check_multiple_harddisks(void)
|
||||||
|
{
|
||||||
|
return 2 <= hds_count;
|
||||||
|
}
|
||||||
|
|
||||||
bool fsck(struct filesystem* fs)
|
bool fsck(struct filesystem* fs)
|
||||||
{
|
{
|
||||||
const char* bdev_path = path_of_blockdevice(fs->bdev);
|
const char* bdev_path = path_of_blockdevice(fs->bdev);
|
||||||
|
|
|
@ -43,6 +43,7 @@ void scan_devices(void);
|
||||||
struct filesystem* search_for_filesystem_by_uuid(const unsigned char* uuid);
|
struct filesystem* search_for_filesystem_by_uuid(const unsigned char* uuid);
|
||||||
struct filesystem* search_for_filesystem_by_spec(const char* spec);
|
struct filesystem* search_for_filesystem_by_spec(const char* spec);
|
||||||
bool check_lacking_partition_table(void);
|
bool check_lacking_partition_table(void);
|
||||||
|
bool check_multiple_harddisks(void);
|
||||||
bool fsck(struct filesystem* fs);
|
bool fsck(struct filesystem* fs);
|
||||||
void free_mountpoints(struct mountpoint* mnts, size_t mnts_count);
|
void free_mountpoints(struct mountpoint* mnts, size_t mnts_count);
|
||||||
bool load_mountpoints(const char* fstab_path,
|
bool load_mountpoints(const char* fstab_path,
|
||||||
|
|
|
@ -665,14 +665,19 @@ int main(void)
|
||||||
const char* mktable_tip = "";
|
const char* mktable_tip = "";
|
||||||
if ( check_lacking_partition_table() )
|
if ( check_lacking_partition_table() )
|
||||||
mktable_tip = "Type mktable to make a new partition table. ";
|
mktable_tip = "Type mktable to make a new partition table. ";
|
||||||
|
const char* devices_tip = "";
|
||||||
|
if ( check_multiple_harddisks() )
|
||||||
|
devices_tip = "Type devices to list the devices. "
|
||||||
|
"Type device 1 to switch to device 1. ";
|
||||||
textf("Type ls to list partitions on the device. "
|
textf("Type ls to list partitions on the device. "
|
||||||
|
"%s"
|
||||||
"%s"
|
"%s"
|
||||||
"Type mkpart to make a new partition. "
|
"Type mkpart to make a new partition. "
|
||||||
"Type mount 2 / to create a mountpoint for partition 2. "
|
"Type mount 2 / to create a mountpoint for partition 2. "
|
||||||
"Type exit when done. "
|
"Type exit when done. "
|
||||||
"There is partitioning advice in installation(7). "
|
"There is partitioning advice in installation(7). "
|
||||||
"Type man 8 disked to display the disked(8) man page.\n",
|
"Type man 8 disked to display the disked(8) man page.\n",
|
||||||
mktable_tip);
|
mktable_tip, devices_tip);
|
||||||
struct filesystem* root_filesystem = NULL;
|
struct filesystem* root_filesystem = NULL;
|
||||||
struct filesystem* boot_filesystem = NULL;
|
struct filesystem* boot_filesystem = NULL;
|
||||||
struct filesystem* bootloader_filesystem = NULL;
|
struct filesystem* bootloader_filesystem = NULL;
|
||||||
|
|
Loading…
Reference in New Issue