Page MenuHomeFreeBSD

D35914.id108651.diff
No OneTemporary

D35914.id108651.diff

Index: stand/common/disk.h
===================================================================
--- stand/common/disk.h
+++ stand/common/disk.h
@@ -116,7 +116,8 @@
* Print information about slices on a disk.
*/
extern int disk_print(struct disk_devdesc *, char *, int);
-extern char* disk_fmtdev(struct disk_devdesc *);
extern int disk_parsedev(struct disk_devdesc *, const char *, const char **);
+char *disk_fmtdev(struct devdesc *vdev);
+
#endif /* _DISK_H */
Index: stand/common/disk.c
===================================================================
--- stand/common/disk.c
+++ stand/common/disk.c
@@ -34,6 +34,7 @@
#include <stdarg.h>
#include <bootstrap.h>
#include <part.h>
+#include <assert.h>
#include "disk.h"
@@ -386,11 +387,13 @@
}
char *
-disk_fmtdev(struct disk_devdesc *dev)
+disk_fmtdev(struct devdesc *vdev)
{
+ struct disk_devdesc *dev = (struct disk_devdesc *)vdev;
static char buf[128];
char *cp;
+ assert(vdev->d_dev->dv_type == DEVT_DISK);
cp = buf + sprintf(buf, "%s%d", dev->dd.d_dev->dv_name, dev->dd.d_unit);
if (dev->d_slice > D_SLICENONE) {
#ifdef LOADER_GPT_SUPPORT
Index: stand/libsa/geli/gelidev.c
===================================================================
--- stand/libsa/geli/gelidev.c
+++ stand/libsa/geli/gelidev.c
@@ -305,7 +305,7 @@
hlastblk = (hmediasize / DEV_BSIZE) - 1;
/* Taste the host provider. If it's not geli-encrypted just return. */
- gdev = geli_taste(diskdev_read, hdesc, hlastblk, disk_fmtdev(hdesc));
+ gdev = geli_taste(diskdev_read, hdesc, hlastblk, disk_fmtdev(&hdesc->dd));
if (gdev == NULL)
return;

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 28, 9:58 PM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29083944
Default Alt Text
D35914.id108651.diff (1 KB)

Event Timeline