Page MenuHomeFreeBSD

D18558.diff
No OneTemporary

D18558.diff

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

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)

Event Timeline