Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105536305
D34879.id105944.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
667 B
Referenced Files
None
Subscribers
None
D34879.id105944.diff
View Options
diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c
--- a/usr.sbin/bsdinstall/partedit/part_wizard.c
+++ b/usr.sbin/bsdinstall/partedit/part_wizard.c
@@ -135,6 +135,16 @@
continue;
if (strncmp(pp->lg_name, "cd", 2) == 0)
continue;
+ /*
+ * Check if the disk is available to be opened for
+ * write operations, it helps prevent the USB
+ * stick used to boot from being listed as an option
+ */
+ fd = g_open(pp->lg_name, 1);
+ if (fd == -1) {
+ continue;
+ }
+ g_close(fd);
disks = realloc(disks, (++n)*sizeof(disks[0]));
disks[n-1].name = pp->lg_name;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 9:44 AM (15 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15480050
Default Alt Text
D34879.id105944.diff (667 B)
Attached To
Mode
D34879: bsdinstall: Filter out devices that cannot be opened
Attached
Detach File
Event Timeline
Log In to Comment