1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Add sysinstall(8) tip for selecting devices in disked(8).

This commit is contained in:
Jonas 'Sortie' Termansen 2016-08-28 20:46:55 +02:00
parent a90d4dbf23
commit ac37d66a93
3 changed files with 12 additions and 1 deletions

View file

@ -186,6 +186,11 @@ bool check_lacking_partition_table(void)
return false;
}
bool check_multiple_harddisks(void)
{
return 2 <= hds_count;
}
bool fsck(struct filesystem* fs)
{
const char* bdev_path = path_of_blockdevice(fs->bdev);

View file

@ -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_spec(const char* spec);
bool check_lacking_partition_table(void);
bool check_multiple_harddisks(void);
bool fsck(struct filesystem* fs);
void free_mountpoints(struct mountpoint* mnts, size_t mnts_count);
bool load_mountpoints(const char* fstab_path,

View file

@ -665,14 +665,19 @@ int main(void)
const char* mktable_tip = "";
if ( check_lacking_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. "
"%s"
"%s"
"Type mkpart to make a new partition. "
"Type mount 2 / to create a mountpoint for partition 2. "
"Type exit when done. "
"There is partitioning advice in installation(7). "
"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* boot_filesystem = NULL;
struct filesystem* bootloader_filesystem = NULL;