7 * return partition name - uses static storage unless buf is supplied
10 partnamebf(char *dev, int pno, int lth, int bufsiz, char *bufp) {
11 static char buffer[80];
17 bufsiz = sizeof(buffer);
23 if (isdigit(dev[w-1]))
26 /* devfs kludge - note: fdisk partition names are not supposed
27 to equal kernel names, so there is no reason to do this */
28 if (strcmp (dev + w - 4, "disc") == 0) {
36 snprintf(bufp, bufsiz, "%*.*s%s%-2u",
37 lth-wp-2, w, dev, p, pno);
39 snprintf(bufp, bufsiz, "%.*s%s%-2u", w, dev, p, pno);
45 partname(char *dev, int pno, int lth) {
46 return partnamebf(dev, pno, lth, 0, NULL);