aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_bsd.c8
-rw-r--r--sys/geom/geom_mbr.c8
-rw-r--r--sys/geom/geom_sunlabel.c8
-rw-r--r--sys/geom/geom_vol_ffs.c7
4 files changed, 31 insertions, 0 deletions
diff --git a/sys/geom/geom_bsd.c b/sys/geom/geom_bsd.c
index be3ec333aec9..ff29a1629f59 100644
--- a/sys/geom/geom_bsd.c
+++ b/sys/geom/geom_bsd.c
@@ -72,6 +72,8 @@ FEATURE(geom_bsd, "GEOM BSD disklabels support");
#define LABELSIZE (148 + 16 * MAXPARTITIONS)
+static int g_bsd_once;
+
static void g_bsd_hotwrite(void *arg, int flag);
/*
* Our private data about one instance. All the rest is handled by the
@@ -504,6 +506,12 @@ g_bsd_taste(struct g_class *mp, struct g_provider *pp, int flags)
g_slice_conf_hot(gp, 0, ms->labeloffset, LABELSIZE,
G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL);
gsp->hot = g_bsd_hotwrite;
+ if (!g_bsd_once) {
+ g_bsd_once = 1;
+ printf(
+ "WARNING: geom_bsd (geom %s) is deprecated, "
+ "use gpart instead.\n", gp->name);
+ }
return (gp);
}
/*
diff --git a/sys/geom/geom_mbr.c b/sys/geom/geom_mbr.c
index a811e351b1a4..f2869d3a3e69 100644
--- a/sys/geom/geom_mbr.c
+++ b/sys/geom/geom_mbr.c
@@ -57,6 +57,8 @@ FEATURE(geom_mbr, "GEOM DOS/MBR partitioning support");
#define MBR_CLASS_NAME "MBR"
#define MBREXT_CLASS_NAME "MBREXT"
+static int g_mbr_once = 0;
+
static struct dos_partition historical_bogus_partition_table[NDOSPART] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
@@ -316,6 +318,12 @@ g_mbr_taste(struct g_class *mp, struct g_provider *pp, int insist)
g_slice_spoiled(cp);
return (NULL);
}
+ if (!g_mbr_once) {
+ g_mbr_once = 1;
+ printf(
+ "WARNING: geom_mbr (geom %s) is deprecated, "
+ "use gpart instead.\n", gp->name);
+ }
return (gp);
}
diff --git a/sys/geom/geom_sunlabel.c b/sys/geom/geom_sunlabel.c
index 5ac35adca1b1..7ec02a324313 100644
--- a/sys/geom/geom_sunlabel.c
+++ b/sys/geom/geom_sunlabel.c
@@ -65,6 +65,8 @@ struct g_sunlabel_softc {
u_char labelsum[16];
};
+static int g_sunlabel_once = 0;
+
static int
g_sunlabel_modify(struct g_geom *gp, struct g_sunlabel_softc *ms, u_char *sec0)
{
@@ -312,6 +314,12 @@ g_sunlabel_taste(struct g_class *mp, struct g_provider *pp, int flags)
g_slice_conf_hot(gp, 0, 0, SUN_SIZE,
G_SLICE_HOT_ALLOW, G_SLICE_HOT_DENY, G_SLICE_HOT_CALL);
gsp->hot = g_sunlabel_hotwrite;
+ if (!g_sunlabel_once) {
+ g_sunlabel_once = 1;
+ printf(
+ "WARNING: geom_sunlabel (geom %s) is deprecated, "
+ "use gpart instead.\n", gp->name);
+ }
return (gp);
}
diff --git a/sys/geom/geom_vol_ffs.c b/sys/geom/geom_vol_ffs.c
index 4fa4da599893..81e1e2cff601 100644
--- a/sys/geom/geom_vol_ffs.c
+++ b/sys/geom/geom_vol_ffs.c
@@ -48,6 +48,7 @@ FEATURE(geom_vol, "GEOM support for volume names from UFS superblock");
#define VOL_FFS_CLASS_NAME "VOL_FFS"
static int superblocks[] = SBLOCKSEARCH;
+static int g_vol_ffs_once;
struct g_vol_ffs_softc {
char * vol;
@@ -145,6 +146,12 @@ g_vol_ffs_taste(struct g_class *mp, struct g_provider *pp, int flags)
g_slice_spoiled(cp);
return (NULL);
}
+ if (!g_vol_ffs_once) {
+ g_vol_ffs_once = 1;
+ printf(
+ "WARNING: geom_vol_Ffs (geom %s) is deprecated, "
+ "use glabel instead.\n", gp->name);
+ }
return (gp);
}