Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148073659
D35914.1785283798.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35914.1785283798.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 29, 12:09 AM (14 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29298347
Default Alt Text
D35914.1785283798.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