Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171071574
D35914.id109179.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
D35914.id109179.diff
View Options
diff --git a/stand/common/disk.h b/stand/common/disk.h
--- a/stand/common/disk.h
+++ b/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 */
diff --git a/stand/common/disk.c b/stand/common/disk.c
--- a/stand/common/disk.c
+++ b/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
diff --git a/stand/libsa/geli/gelidev.c b/stand/libsa/geli/gelidev.c
--- a/stand/libsa/geli/gelidev.c
+++ b/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
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 1:04 PM (3 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38564215
Default Alt Text
D35914.id109179.diff (1 KB)
Attached To
Mode
D35914: stand: Change disk_fmtdev to take a struct devdesc *
Attached
Detach File
Event Timeline
Log In to Comment