Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133413033
D18558.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18558.diff
View Options
Index: head/stand/libsa/zfs/zfs.c
===================================================================
--- head/stand/libsa/zfs/zfs.c
+++ head/stand/libsa/zfs/zfs.c
@@ -33,15 +33,16 @@
* Stand-alone file reading package.
*/
+#include <stand.h>
#include <sys/disk.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/queue.h>
+#include <disk.h>
#include <part.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
-#include <stand.h>
#include <bootstrap.h>
#include "libzfs.h"
@@ -517,6 +518,7 @@
int
zfs_probe_dev(const char *devname, uint64_t *pool_guid)
{
+ struct disk_devdesc *dev;
struct ptable *table;
struct zfs_probe_args pa;
uint64_t mediasz;
@@ -532,6 +534,17 @@
* disks and some systems will misreport the disk sizes and will
* hang while accessing the disk.
*/
+ if (archsw.arch_getdev((void **)&dev, devname, NULL) == 0) {
+ int partition = dev->d_partition;
+ int slice = dev->d_slice;
+
+ free(dev);
+ if (partition != -1 && slice != -1) {
+ ret = zfs_probe(pa.fd, pool_guid);
+ if (ret == 0)
+ return (0);
+ }
+ }
/* Probe each partition */
ret = ioctl(pa.fd, DIOCGMEDIASIZE, &mediasz);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 26, 3:10 PM (6 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24235584
Default Alt Text
D18558.diff (1 KB)
Attached To
Mode
D18558: loader: zfs reader should not probe partitionless disks
Attached
Detach File
Event Timeline
Log In to Comment