Extract the device major number from a raw device number (usually the st_dev or st_rdev field from stat).
os.major(device, /)