2008-07-01 Pavel Roskin <proski@gnu.org>
[grub2/bean.git] / fs / iso9660.c
blob143585ae7599a046b758443c1893a960d660d7e4
1 /* iso9660.c - iso9660 implementation with extensions:
2 SUSP, Rock Ridge. */
3 /*
4 * GRUB -- GRand Unified Bootloader
5 * Copyright (C) 2004,2005,2006,2007 Free Software Foundation, Inc.
7 * GRUB is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * GRUB is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
21 #include <grub/err.h>
22 #include <grub/file.h>
23 #include <grub/mm.h>
24 #include <grub/misc.h>
25 #include <grub/disk.h>
26 #include <grub/dl.h>
27 #include <grub/types.h>
28 #include <grub/fshelp.h>
30 #define GRUB_ISO9660_FSTYPE_DIR 0040000
31 #define GRUB_ISO9660_FSTYPE_REG 0100000
32 #define GRUB_ISO9660_FSTYPE_SYMLINK 0120000
33 #define GRUB_ISO9660_FSTYPE_MASK 0170000
35 #define GRUB_ISO9660_LOG2_BLKSZ 2
36 #define GRUB_ISO9660_BLKSZ 2048
38 #define GRUB_ISO9660_RR_DOT 2
39 #define GRUB_ISO9660_RR_DOTDOT 4
41 #define GRUB_ISO9660_VOLDESC_BOOT 0
42 #define GRUB_ISO9660_VOLDESC_PRIMARY 1
43 #define GRUB_ISO9660_VOLDESC_SUPP 2
44 #define GRUB_ISO9660_VOLDESC_PART 3
45 #define GRUB_ISO9660_VOLDESC_END 255
47 /* The head of a volume descriptor. */
48 struct grub_iso9660_voldesc
50 grub_uint8_t type;
51 grub_uint8_t magic[5];
52 grub_uint8_t version;
53 } __attribute__ ((packed));
55 /* A directory entry. */
56 struct grub_iso9660_dir
58 grub_uint8_t len;
59 grub_uint8_t ext_sectors;
60 grub_uint32_t first_sector;
61 grub_uint32_t first_sector_be;
62 grub_uint32_t size;
63 grub_uint32_t size_be;
64 grub_uint8_t unused1[7];
65 grub_uint8_t flags;
66 grub_uint8_t unused2[6];
67 grub_uint8_t namelen;
68 } __attribute__ ((packed));
70 /* The primary volume descriptor. Only little endian is used. */
71 struct grub_iso9660_primary_voldesc
73 struct grub_iso9660_voldesc voldesc;
74 grub_uint8_t unused1[33];
75 grub_uint8_t volname[32];
76 grub_uint8_t unused2[16];
77 grub_uint8_t escape[32];
78 grub_uint8_t unused3[12];
79 grub_uint32_t path_table_size;
80 grub_uint8_t unused4[4];
81 grub_uint32_t path_table;
82 grub_uint8_t unused5[12];
83 struct grub_iso9660_dir rootdir;
84 } __attribute__ ((packed));
86 /* A single entry in the path table. */
87 struct grub_iso9660_path
89 grub_uint8_t len;
90 grub_uint8_t sectors;
91 grub_uint32_t first_sector;
92 grub_uint16_t parentdir;
93 grub_uint8_t name[0];
94 } __attribute__ ((packed));
96 /* An entry in the System Usage area of the directory entry. */
97 struct grub_iso9660_susp_entry
99 grub_uint8_t sig[2];
100 grub_uint8_t len;
101 grub_uint8_t version;
102 grub_uint8_t data[0];
103 } __attribute__ ((packed));
105 /* The CE entry. This is used to describe the next block where data
106 can be found. */
107 struct grub_iso9660_susp_ce
109 struct grub_iso9660_susp_entry entry;
110 grub_uint32_t blk;
111 grub_uint32_t blk_be;
112 grub_uint32_t off;
113 grub_uint32_t off_be;
114 grub_uint32_t len;
115 grub_uint32_t len_be;
116 } __attribute__ ((packed));
118 struct grub_iso9660_data
120 struct grub_iso9660_primary_voldesc voldesc;
121 grub_disk_t disk;
122 unsigned int first_sector;
123 unsigned int length;
124 int rockridge;
125 int susp_skip;
126 int joliet;
129 struct grub_fshelp_node
131 struct grub_iso9660_data *data;
132 unsigned int size;
133 unsigned int blk;
134 unsigned int dir_blk;
135 unsigned int dir_off;
138 #ifndef GRUB_UTIL
139 static grub_dl_t my_mod;
140 #endif
143 /* Iterate over the susp entries, starting with block SUA_BLOCK on the
144 offset SUA_POS with a size of SUA_SIZE bytes. Hook is called for
145 every entry. */
146 static grub_err_t
147 grub_iso9660_susp_iterate (struct grub_iso9660_data *data,
148 int sua_block, int sua_pos, int sua_size,
149 grub_err_t (*hook)
150 (struct grub_iso9660_susp_entry *entry))
152 char *sua;
153 struct grub_iso9660_susp_entry *entry;
155 auto grub_err_t load_sua (void);
157 /* Load a part of the System Usage Area. */
158 grub_err_t load_sua (void)
160 sua = grub_malloc (sua_size);
161 if (!sua)
162 return grub_errno;
164 if (grub_disk_read (data->disk, sua_block, sua_pos,
165 sua_size, sua))
166 return grub_errno;
168 entry = (struct grub_iso9660_susp_entry *) sua;
169 return 0;
172 if (load_sua ())
173 return grub_errno;
175 for (; (char *) entry < (char *) sua + sua_size - 1;
176 entry = (struct grub_iso9660_susp_entry *)
177 ((char *) entry + entry->len))
179 /* The last entry. */
180 if (grub_strncmp ((char *) entry->sig, "ST", 2) == 0)
181 break;
183 /* Additional entries are stored elsewhere. */
184 if (grub_strncmp ((char *) entry->sig, "CE", 2) == 0)
186 struct grub_iso9660_susp_ce *ce;
188 ce = (struct grub_iso9660_susp_ce *) entry;
189 sua_size = grub_le_to_cpu32 (ce->len);
190 sua_pos = grub_le_to_cpu32 (ce->off);
191 sua_block = grub_le_to_cpu32 (ce->blk) << GRUB_ISO9660_LOG2_BLKSZ;
193 grub_free (sua);
194 if (load_sua ())
195 return grub_errno;
198 if (hook (entry))
200 grub_free (sua);
201 return 0;
205 grub_free (sua);
206 return 0;
209 static char *
210 grub_iso9660_convert_string (grub_uint16_t *us, int len)
212 char *p;
213 int i;
215 p = grub_malloc (len * 4 + 1);
216 if (! p)
217 return p;
219 for (i=0; i<len; i++)
220 us[i] = grub_be_to_cpu16 (us[i]);
222 *grub_utf16_to_utf8 ((grub_uint8_t *) p, us, len) = '\0';
224 return p;
227 static struct grub_iso9660_data *
228 grub_iso9660_mount (grub_disk_t disk)
230 struct grub_iso9660_data *data = 0;
231 struct grub_iso9660_dir rootdir;
232 int sua_pos;
233 int sua_size;
234 char *sua;
235 struct grub_iso9660_susp_entry *entry;
236 struct grub_iso9660_primary_voldesc voldesc;
237 int block;
239 auto grub_err_t susp_iterate (struct grub_iso9660_susp_entry *);
241 grub_err_t susp_iterate (struct grub_iso9660_susp_entry *susp_entry)
243 /* The "ER" entry is used to detect extensions. The
244 `IEEE_P1285' extension means Rock ridge. */
245 if (grub_strncmp ((char *) susp_entry->sig, "ER", 2) == 0)
247 data->rockridge = 1;
248 return 1;
250 return 0;
253 data = grub_malloc (sizeof (struct grub_iso9660_data));
254 if (! data)
255 return 0;
257 data->disk = disk;
258 data->rockridge = 0;
259 data->joliet = 0;
261 block = 16;
264 int copy_voldesc = 0;
266 /* Read the superblock. */
267 if (grub_disk_read (disk, block << GRUB_ISO9660_LOG2_BLKSZ, 0,
268 sizeof (struct grub_iso9660_primary_voldesc),
269 (char *) &voldesc))
271 grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
272 goto fail;
275 if (grub_strncmp ((char *) voldesc.voldesc.magic, "CD001", 5) != 0)
277 grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
278 goto fail;
281 if (voldesc.voldesc.type == GRUB_ISO9660_VOLDESC_PRIMARY)
282 copy_voldesc = 1;
283 else if ((voldesc.voldesc.type == GRUB_ISO9660_VOLDESC_SUPP) &&
284 (voldesc.escape[0] == 0x25) && (voldesc.escape[1] == 0x2f) &&
285 ((voldesc.escape[2] == 0x40) || /* UCS-2 Level 1. */
286 (voldesc.escape[2] == 0x43) || /* UCS-2 Level 2. */
287 (voldesc.escape[2] == 0x45))) /* UCS-2 Level 3. */
289 copy_voldesc = 1;
290 data->joliet = 1;
293 if (copy_voldesc)
294 grub_memcpy((char *) &data->voldesc, (char *) &voldesc,
295 sizeof (struct grub_iso9660_primary_voldesc));
297 block++;
298 } while (voldesc.voldesc.type != GRUB_ISO9660_VOLDESC_END);
300 /* Read the system use area and test it to see if SUSP is
301 supported. */
302 if (grub_disk_read (disk, (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
303 << GRUB_ISO9660_LOG2_BLKSZ), 0,
304 sizeof (rootdir), (char *) &rootdir))
306 grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
307 goto fail;
310 sua_pos = (sizeof (rootdir) + rootdir.namelen
311 + (rootdir.namelen % 2) - 1);
312 sua_size = rootdir.len - sua_pos;
314 sua = grub_malloc (sua_size);
315 if (! sua)
316 goto fail;
318 if (grub_disk_read (disk, (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
319 << GRUB_ISO9660_LOG2_BLKSZ), sua_pos,
320 sua_size, sua))
322 grub_error (GRUB_ERR_BAD_FS, "not a iso9660 filesystem");
323 goto fail;
326 entry = (struct grub_iso9660_susp_entry *) sua;
328 /* Test if the SUSP protocol is used on this filesystem. */
329 if (grub_strncmp ((char *) entry->sig, "SP", 2) == 0)
331 /* The 2nd data byte stored how many bytes are skipped every time
332 to get to the SUA (System Usage Area). */
333 data->susp_skip = entry->data[2];
334 entry = (struct grub_iso9660_susp_entry *) ((char *) entry + entry->len);
336 /* Iterate over the entries in the SUA area to detect
337 extensions. */
338 if (grub_iso9660_susp_iterate (data,
339 (grub_le_to_cpu32 (data->voldesc.rootdir.first_sector)
340 << GRUB_ISO9660_LOG2_BLKSZ),
341 sua_pos, sua_size, susp_iterate))
342 goto fail;
345 return data;
347 fail:
348 grub_free (data);
349 return 0;
353 static char *
354 grub_iso9660_read_symlink (grub_fshelp_node_t node)
356 struct grub_iso9660_dir dirent;
357 int sua_off;
358 int sua_size;
359 char *symlink = 0;
360 int addslash = 0;
362 auto void add_part (const char *part, int len);
363 auto grub_err_t susp_iterate_sl (struct grub_iso9660_susp_entry *);
365 /* Extend the symlink. */
366 void add_part (const char *part, int len)
368 int size = grub_strlen (symlink);
370 symlink = grub_realloc (symlink, size + len + 1);
371 if (! symlink)
372 return;
374 grub_strncat (symlink, part, len);
377 /* Read in a symlink. */
378 grub_err_t susp_iterate_sl (struct grub_iso9660_susp_entry *entry)
380 if (grub_strncmp ("SL", (char *) entry->sig, 2) == 0)
382 unsigned int pos = 1;
384 /* The symlink is not stored as a POSIX symlink, translate it. */
385 while (pos < grub_le_to_cpu32 (entry->len))
387 if (addslash)
389 add_part ("/", 1);
390 addslash = 0;
393 /* The current position is the `Component Flag'. */
394 switch (entry->data[pos] & 30)
396 case 0:
398 /* The data on pos + 2 is the actual data, pos + 1
399 is the length. Both are part of the `Component
400 Record'. */
401 add_part ((char *) &entry->data[pos + 2],
402 entry->data[pos + 1]);
403 if ((entry->data[pos] & 1))
404 addslash = 1;
406 break;
409 case 2:
410 add_part ("./", 2);
411 break;
413 case 4:
414 add_part ("../", 3);
415 break;
417 case 8:
418 add_part ("/", 1);
419 break;
421 /* In pos + 1 the length of the `Component Record' is
422 stored. */
423 pos += entry->data[pos + 1] + 2;
426 /* Check if `grub_realloc' failed. */
427 if (grub_errno)
428 return grub_errno;
431 return 0;
434 if (grub_disk_read (node->data->disk, node->dir_blk, node->dir_off,
435 sizeof (dirent), (char *) &dirent))
436 return 0;
438 sua_off = (sizeof (dirent) + dirent.namelen + 1 - (dirent.namelen % 2)
439 + node->data->susp_skip);
440 sua_size = dirent.len - sua_off;
442 symlink = grub_malloc (1);
443 if (!symlink)
444 return 0;
446 *symlink = '\0';
448 if (grub_iso9660_susp_iterate (node->data, node->dir_blk,
449 node->dir_off + sua_off,
450 sua_size, susp_iterate_sl))
452 grub_free (symlink);
453 return 0;
456 return symlink;
460 static int
461 grub_iso9660_iterate_dir (grub_fshelp_node_t dir,
462 int NESTED_FUNC_ATTR
463 (*hook) (const char *filename,
464 enum grub_fshelp_filetype filetype,
465 grub_fshelp_node_t node))
467 struct grub_iso9660_dir dirent;
468 unsigned int offset = 0;
469 char *filename;
470 int filename_alloc = 0;
471 enum grub_fshelp_filetype type;
473 auto grub_err_t susp_iterate_dir (struct grub_iso9660_susp_entry *);
475 grub_err_t susp_iterate_dir (struct grub_iso9660_susp_entry *entry)
477 /* The filename in the rock ridge entry. */
478 if (grub_strncmp ("NM", (char *) entry->sig, 2) == 0)
480 /* The flags are stored at the data position 0, here the
481 filename type is stored. */
482 if (entry->data[0] & GRUB_ISO9660_RR_DOT)
483 filename = ".";
484 else if (entry->data[0] & GRUB_ISO9660_RR_DOTDOT)
485 filename = "..";
486 else
488 int size = 1;
489 if (filename)
491 size += grub_strlen (filename);
492 grub_realloc (filename,
493 grub_strlen (filename)
494 + entry->len);
496 else
498 size = entry->len - 5;
499 filename = grub_malloc (size + 1);
500 filename[0] = '\0';
502 filename_alloc = 1;
503 grub_strncpy (filename, (char *) &entry->data[1], size);
504 filename[size] = '\0';
507 /* The mode information (st_mode). */
508 else if (grub_strncmp ((char *) entry->sig, "PX", 2) == 0)
510 /* At position 0 of the PX record the st_mode information is
511 stored. */
512 grub_uint32_t mode = ((*(grub_uint32_t *) &entry->data[0])
513 & GRUB_ISO9660_FSTYPE_MASK);
515 switch (mode)
517 case GRUB_ISO9660_FSTYPE_DIR:
518 type = GRUB_FSHELP_DIR;
519 break;
520 case GRUB_ISO9660_FSTYPE_REG:
521 type = GRUB_FSHELP_REG;
522 break;
523 case GRUB_ISO9660_FSTYPE_SYMLINK:
524 type = GRUB_FSHELP_SYMLINK;
525 break;
526 default:
527 type = GRUB_FSHELP_UNKNOWN;
531 return 0;
534 while (offset < dir->size)
536 if (grub_disk_read (dir->data->disk,
537 (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
538 + offset / GRUB_DISK_SECTOR_SIZE,
539 offset % GRUB_DISK_SECTOR_SIZE,
540 sizeof (dirent), (char *) &dirent))
541 return 0;
543 /* The end of the block, skip to the next one. */
544 if (!dirent.len)
546 offset = (offset / GRUB_ISO9660_BLKSZ + 1) * GRUB_ISO9660_BLKSZ;
547 continue;
551 char name[dirent.namelen + 1];
552 int nameoffset = offset + sizeof (dirent);
553 struct grub_fshelp_node *node;
554 int sua_off = (sizeof (dirent) + dirent.namelen + 1
555 - (dirent.namelen % 2));;
556 int sua_size = dirent.len - sua_off;
558 sua_off += offset + dir->data->susp_skip;
560 filename = 0;
561 filename_alloc = 0;
562 type = GRUB_FSHELP_UNKNOWN;
564 if (dir->data->rockridge
565 && grub_iso9660_susp_iterate (dir->data,
566 (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
567 + (sua_off
568 / GRUB_DISK_SECTOR_SIZE),
569 sua_off % GRUB_DISK_SECTOR_SIZE,
570 sua_size, susp_iterate_dir))
571 return 0;
573 /* Read the name. */
574 if (grub_disk_read (dir->data->disk,
575 (dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
576 + nameoffset / GRUB_DISK_SECTOR_SIZE,
577 nameoffset % GRUB_DISK_SECTOR_SIZE,
578 dirent.namelen, (char *) name))
579 return 0;
581 node = grub_malloc (sizeof (struct grub_fshelp_node));
582 if (!node)
583 return 0;
585 /* Setup a new node. */
586 node->data = dir->data;
587 node->size = grub_le_to_cpu32 (dirent.size);
588 node->blk = grub_le_to_cpu32 (dirent.first_sector);
589 node->dir_blk = ((dir->blk << GRUB_ISO9660_LOG2_BLKSZ)
590 + offset / GRUB_DISK_SECTOR_SIZE);
591 node->dir_off = offset % GRUB_DISK_SECTOR_SIZE;
593 /* If the filetype was not stored using rockridge, use
594 whatever is stored in the iso9660 filesystem. */
595 if (type == GRUB_FSHELP_UNKNOWN)
597 if ((dirent.flags & 3) == 2)
598 type = GRUB_FSHELP_DIR;
599 else
600 type = GRUB_FSHELP_REG;
603 /* The filename was not stored in a rock ridge entry. Read it
604 from the iso9660 filesystem. */
605 if (!filename)
607 name[dirent.namelen] = '\0';
608 filename = grub_strrchr (name, ';');
609 if (filename)
610 *filename = '\0';
612 if (dirent.namelen == 1 && name[0] == 0)
613 filename = ".";
614 else if (dirent.namelen == 1 && name[0] == 1)
615 filename = "..";
616 else
617 filename = name;
620 if (dir->data->joliet)
622 char *oldname;
624 oldname = filename;
625 filename = grub_iso9660_convert_string
626 ((grub_uint16_t *) oldname, dirent.namelen >> 1);
628 if (filename_alloc)
629 grub_free (oldname);
631 filename_alloc = 1;
634 if (hook (filename, type, node))
636 if (filename_alloc)
637 grub_free (filename);
638 return 1;
640 if (filename_alloc)
641 grub_free (filename);
644 offset += dirent.len;
647 return 0;
652 static grub_err_t
653 grub_iso9660_dir (grub_device_t device, const char *path,
654 int (*hook) (const char *filename, int dir))
656 struct grub_iso9660_data *data = 0;
657 struct grub_fshelp_node rootnode;
658 struct grub_fshelp_node *foundnode;
660 auto int NESTED_FUNC_ATTR iterate (const char *filename,
661 enum grub_fshelp_filetype filetype,
662 grub_fshelp_node_t node);
664 int NESTED_FUNC_ATTR iterate (const char *filename,
665 enum grub_fshelp_filetype filetype,
666 grub_fshelp_node_t node)
668 grub_free (node);
670 if (filetype == GRUB_FSHELP_DIR)
671 return hook (filename, 1);
672 else
673 return hook (filename, 0);
675 return 0;
678 #ifndef GRUB_UTIL
679 grub_dl_ref (my_mod);
680 #endif
682 data = grub_iso9660_mount (device->disk);
683 if (! data)
684 goto fail;
686 rootnode.data = data;
687 rootnode.blk = grub_le_to_cpu32 (data->voldesc.rootdir.first_sector);
688 rootnode.size = grub_le_to_cpu32 (data->voldesc.rootdir.size);
690 /* Use the fshelp function to traverse the path. */
691 if (grub_fshelp_find_file (path, &rootnode,
692 &foundnode,
693 grub_iso9660_iterate_dir,
694 grub_iso9660_read_symlink,
695 GRUB_FSHELP_DIR))
696 goto fail;
698 /* List the files in the directory. */
699 grub_iso9660_iterate_dir (foundnode, iterate);
701 if (foundnode != &rootnode)
702 grub_free (foundnode);
704 fail:
705 grub_free (data);
707 #ifndef GRUB_UTIL
708 grub_dl_unref (my_mod);
709 #endif
711 return grub_errno;
715 /* Open a file named NAME and initialize FILE. */
716 static grub_err_t
717 grub_iso9660_open (struct grub_file *file, const char *name)
719 struct grub_iso9660_data *data;
720 struct grub_fshelp_node rootnode;
721 struct grub_fshelp_node *foundnode;
723 #ifndef GRUB_UTIL
724 grub_dl_ref (my_mod);
725 #endif
727 data = grub_iso9660_mount (file->device->disk);
728 if (!data)
729 goto fail;
731 rootnode.data = data;
732 rootnode.blk = grub_le_to_cpu32 (data->voldesc.rootdir.first_sector);
733 rootnode.size = grub_le_to_cpu32 (data->voldesc.rootdir.size);
735 /* Use the fshelp function to traverse the path. */
736 if (grub_fshelp_find_file (name, &rootnode,
737 &foundnode,
738 grub_iso9660_iterate_dir,
739 grub_iso9660_read_symlink,
740 GRUB_FSHELP_REG))
741 goto fail;
743 data->first_sector = foundnode->blk;
744 data->length = foundnode->size;
746 file->data = data;
747 file->size = foundnode->size;
748 file->offset = 0;
750 return 0;
752 fail:
753 #ifndef GRUB_UTIL
754 grub_dl_unref (my_mod);
755 #endif
757 grub_free (data);
759 return grub_errno;;
763 static grub_ssize_t
764 grub_iso9660_read (grub_file_t file, char *buf, grub_size_t len)
766 struct grub_iso9660_data *data =
767 (struct grub_iso9660_data *) file->data;
769 /* XXX: The file is stored in as a single extent. */
770 data->disk->read_hook = file->read_hook;
771 grub_disk_read (data->disk,
772 data->first_sector << GRUB_ISO9660_LOG2_BLKSZ,
773 file->offset,
774 len, buf);
775 data->disk->read_hook = 0;
777 return len;
781 static grub_err_t
782 grub_iso9660_close (grub_file_t file)
784 grub_free (file->data);
786 #ifndef GRUB_UTIL
787 grub_dl_unref (my_mod);
788 #endif
790 return GRUB_ERR_NONE;
794 static grub_err_t
795 grub_iso9660_label (grub_device_t device, char **label)
797 struct grub_iso9660_data *data;
798 data = grub_iso9660_mount (device->disk);
800 if (data)
802 if (data->joliet)
803 *label = grub_iso9660_convert_string
804 ((grub_uint16_t *) &data->voldesc.volname, 16);
805 else
806 *label = grub_strndup ((char *) data->voldesc.volname, 32);
807 grub_free (data);
809 else
810 *label = 0;
812 return grub_errno;
817 static struct grub_fs grub_iso9660_fs =
819 .name = "iso9660",
820 .dir = grub_iso9660_dir,
821 .open = grub_iso9660_open,
822 .read = grub_iso9660_read,
823 .close = grub_iso9660_close,
824 .label = grub_iso9660_label,
825 .next = 0
828 GRUB_MOD_INIT(iso9660)
830 grub_fs_register (&grub_iso9660_fs);
831 #ifndef GRUB_UTIL
832 my_mod = mod;
833 #endif
836 GRUB_MOD_FINI(iso9660)
838 grub_fs_unregister (&grub_iso9660_fs);