Lines Matching refs:devt

46 static int __init devt_from_partuuid(const char *uuid_str, dev_t *devt)  in devt_from_partuuid()  argument
80 *devt = part_devt(dev_to_disk(dev), in devt_from_partuuid()
83 *devt = dev->devt; in devt_from_partuuid()
112 static int __init devt_from_partlabel(const char *label, dev_t *devt) in devt_from_partlabel() argument
119 *devt = dev->devt; in devt_from_partlabel()
126 dev_t devt = MKDEV(0, 0); in blk_lookup_devt() local
141 devt = MKDEV(MAJOR(dev->devt), in blk_lookup_devt()
142 MINOR(dev->devt) + partno); in blk_lookup_devt()
144 devt = part_devt(disk, partno); in blk_lookup_devt()
145 if (devt) in blk_lookup_devt()
150 return devt; in blk_lookup_devt()
153 static int __init devt_from_devname(const char *name, dev_t *devt) in devt_from_devname() argument
167 *devt = blk_lookup_devt(s, 0); in devt_from_devname()
168 if (*devt) in devt_from_devname()
183 *devt = blk_lookup_devt(s, part); in devt_from_devname()
184 if (*devt) in devt_from_devname()
191 *devt = blk_lookup_devt(s, part); in devt_from_devname()
192 if (*devt) in devt_from_devname()
197 static int __init devt_from_devnum(const char *name, dev_t *devt) in devt_from_devnum() argument
204 *devt = MKDEV(maj, min); in devt_from_devnum()
205 if (maj != MAJOR(*devt) || min != MINOR(*devt)) in devt_from_devnum()
208 *devt = new_decode_dev(simple_strtoul(name, &p, 16)); in devt_from_devnum()
244 int __init early_lookup_bdev(const char *name, dev_t *devt) in early_lookup_bdev() argument
247 return devt_from_partuuid(name + 9, devt); in early_lookup_bdev()
249 return devt_from_partlabel(name + 10, devt); in early_lookup_bdev()
251 return devt_from_devname(name + 5, devt); in early_lookup_bdev()
252 return devt_from_devnum(name, devt); in early_lookup_bdev()
255 static char __init *bdevt_str(dev_t devt, char *buf) in bdevt_str() argument
257 if (MAJOR(devt) <= 0xff && MINOR(devt) <= 0xff) { in bdevt_str()
259 snprintf(tbuf, BDEVT_SIZE, "%02x%02x", MAJOR(devt), MINOR(devt)); in bdevt_str()
262 snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt)); in bdevt_str()