* Arnaldo Carvalho de Melo <acme@conectiva.com.br>, Mar 1999,
* Phillip Kesling <pkesling@sgi.com>, Mar 2003.
*/
+
#include "c.h"
#include "nls.h"
#include "all-io.h"
sgilabel->volume[0].num_bytes = cpu_to_be32(sizeof(struct sgi_info));
strncpy((char *) sgilabel->volume[0].name, "sgilabel", 8);
- fdisk_info(cxt, _("SGI info created on second sector"));
+ fdisk_info(cxt, _("SGI info created on second sector."));
return 0;
}
int rc = 0;
if (fdisk_context_display_details(cxt))
- fdisk_colon(cxt, _(
+ fdisk_info(cxt, _(
"Label geometry: %d heads, %llu sectors\n"
" %llu cylinders, %d physical cylinders\n"
" %d extra sects/cyl, interleave %d:1\n"),
cxt->geom.cylinders, be16_to_cpu(sgiparam->pcylcount),
(int) sgiparam->sparecyl, be16_to_cpu(sgiparam->ilfact));
- fdisk_colon(cxt, _("Bootfile: %s"), sgilabel->boot_file);
+ fdisk_info(cxt, _("Bootfile: %s"), sgilabel->boot_file);
return rc;
}
sgi_get_start_sector(cxt, Index[0]));
if (verbose && sgi_get_num_sectors(cxt, Index[0]) != lastblock)
- DBG(LABEL, dbgprint(
+ DBG(LABEL, ul_debug(
"entire disk partition=%ds, but disk=%ds",
sgi_get_num_sectors(cxt, Index[0]),
lastblock));
lastblock = sgi_get_num_sectors(cxt, Index[0]);
} else if (verbose) {
fdisk_info(cxt, _("Partition 11 should cover the entire disk."));
- DBG(LABEL, dbgprint("sysid=%d\tpartition=%d",
+ DBG(LABEL, ul_debug("sysid=%d\tpartition=%d",
sgi_get_sysid(cxt, Index[0]), Index[0]+1));
}
for (i=1, start=0; i<sortcount; i++) {
if (verbose && cylsize
&& (sgi_get_start_sector(cxt, Index[i]) % cylsize) != 0)
- DBG(LABEL, dbgprint("partition %d does not start on "
+ DBG(LABEL, ul_debug("partition %d does not start on "
"cylinder boundary.", Index[i]+1));
if (verbose && cylsize
&& sgi_get_num_sectors(cxt, Index[i]) % cylsize != 0)
- DBG(LABEL, dbgprint("partition %d does not end on "
+ DBG(LABEL, ul_debug("partition %d does not end on "
"cylinder boundary.", Index[i]+1));
/* We cannot handle several "entire disk" entries. */
if (cylsize && start % cylsize)
start += cylsize - (start % cylsize);
- DBG(LABEL, dbgprint("%2d:%12d\t%12d\t%12d", Index[i],
+ DBG(LABEL, ul_debug("%2d:%12d\t%12d\t%12d", Index[i],
sgi_get_start_sector(cxt, Index[i]),
sgi_get_num_sectors(cxt, Index[i]),
sgi_get_sysid(cxt, Index[i])));
{
struct fdisk_sgi_label *sgi;
struct sgi_disklabel *sgilabel;
+ int rc;
assert(cxt);
assert(cxt->label);
}
}
#endif
- fdisk_zeroize_firstsector(cxt);
+ rc = fdisk_init_firstsector_buffer(cxt);
+ if (rc)
+ return rc;
+
sgi = (struct fdisk_sgi_label *) cxt->label;
sgi->header = (struct sgi_disklabel *) cxt->firstsector;
static const struct fdisk_column sgi_columns[] =
{
{ FDISK_COL_DEVICE, N_("Device"), 10, 0 },
- { FDISK_COL_START, N_("Start"), 5, TT_FL_RIGHT },
- { FDISK_COL_END, N_("End"), 5, TT_FL_RIGHT },
- { FDISK_COL_SECTORS, N_("Sectors"), 5, TT_FL_RIGHT },
- { FDISK_COL_CYLINDERS, N_("Cylinders"), 5, TT_FL_RIGHT },
- { FDISK_COL_SIZE, N_("Size"), 5, TT_FL_RIGHT, FDISK_COLFL_EYECANDY },
- { FDISK_COL_TYPEID, N_("Id"), 2, TT_FL_RIGHT },
- { FDISK_COL_TYPE, N_("Type"), 0.1, TT_FL_TRUNC, FDISK_COLFL_EYECANDY },
- { FDISK_COL_ATTR, N_("Attrs"), 0, TT_FL_RIGHT }
+ { FDISK_COL_START, N_("Start"), 5, FDISK_COLFL_NUMBER },
+ { FDISK_COL_END, N_("End"), 5, FDISK_COLFL_NUMBER },
+ { FDISK_COL_SECTORS, N_("Sectors"), 5, FDISK_COLFL_NUMBER },
+ { FDISK_COL_CYLINDERS, N_("Cylinders"), 5, FDISK_COLFL_NUMBER },
+ { FDISK_COL_SIZE, N_("Size"), 5, FDISK_COLFL_NUMBER | FDISK_COLFL_EYECANDY },
+ { FDISK_COL_TYPEID, N_("Id"), 2, FDISK_COLFL_NUMBER },
+ { FDISK_COL_TYPE, N_("Type"), 0.1, FDISK_COLFL_EYECANDY },
+ { FDISK_COL_ATTR, N_("Attrs"), 0, FDISK_COLFL_NUMBER }
};
static const struct fdisk_label_operations sgi_operations =