diff options
Diffstat (limited to 'sys/geom/part/g_part_if.m')
-rw-r--r-- | sys/geom/part/g_part_if.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/geom/part/g_part_if.m b/sys/geom/part/g_part_if.m index 8d2e7b5..506e540 100644 --- a/sys/geom/part/g_part_if.m +++ b/sys/geom/part/g_part_if.m @@ -42,6 +42,16 @@ INTERFACE g_part; # Default implementations of methods. CODE { + static void + default_fullname(struct g_part_table *table, + struct g_part_entry *entry, struct sbuf *sb, const char *pfx) + { + char buf[32]; + + sbuf_printf(sb, "%s%s", pfx, + G_PART_NAME(table, entry, buf, sizeof(buf))); + } + static int default_precheck(struct g_part_table *t __unused, enum g_part_ctl r __unused, struct g_part_parms *p __unused) @@ -98,6 +108,14 @@ METHOD int dumpto { struct g_part_entry *entry; }; +# fullname() - write the name of the given partition entry to the sbuf. +METHOD void fullname { + struct g_part_table *table; + struct g_part_entry *entry; + struct sbuf *sb; + const char *pfx; +} DEFAULT default_fullname; + # modify() - scheme specific processing for the modify verb. METHOD int modify { struct g_part_table *table; |