2 * linux/fs/isofs/util.c
4 * The special functions in the file are numbered according to the section
5 * of the iso 9660 standard in which they are described. isonum_733 will
6 * convert numbers according to section 7.3.3, etc.
8 * isofs special functions. This file was lifted in its entirety from
9 * the 386BSD iso9660 filesystem, by Pace Willisson <pace@blitz.com>.
32 return ((p[0] & 0xff) | ((p[1] & 0xff) << 8));
38 return (((p[0] & 0xff) << 8) | (p[1] & 0xff));
45 if (p[0] != p[3] || p[1] != p[2]) {
46 fprintf (stderr, "invalid format 7.2.3 number\n");
50 return (isonum_721 (p));
57 | ((p[1] & 0xff) << 8)
58 | ((p[2] & 0xff) << 16)
59 | ((p[3] & 0xff) << 24));
65 return (((p[0] & 0xff) << 24)
66 | ((p[1] & 0xff) << 16)
67 | ((p[2] & 0xff) << 8)
77 for (i = 0; i < 4; i++) {
79 fprintf (stderr, "bad format 7.3.3 number\n");
84 return (isonum_731 (p));