Constants

This section has a list of constants from bk.h that you may find useful when programming an application with bk.

FNTYPE_*

The constants FNTYPE_9660, FNTYPE_ROCKRIDGE and FNTYPE_JOLIET are used to tell bk what type of ISO extensions to use.

Some bk functions take only one of these, some can take a combination. If a combination is desired you can bitwise or them together. For example to have all three of them: FNTYPE_9660 | FNTYPE_ROCKRIDGE | FNTYPE_JOLIET

In case you don't already know: ISO9660 filenames are limited to 8.3 length and really are only still used for backwards compatibility, but they are required for any written ISO. RockRidge is an extension alowing for longer filenames, permissions, and special files (of the special files only symbolic links are supported in bk). Any Linux/Unix can read RockRidge extensions, but none of the Windowses as far as I know. Joliet is the Microsoft specification for extending ISO9660 - it supports longer filenames and also unicode (UCS2) characters. bk does not support unicode filenames for now.

NCHARS_FILE_ID_MAX_STORE

This is the maximum length of a file or directory name that bk will accept (including the NULL byte). As far as I know there is no filesystem that will allow for filenames longer than this (it is set to 255+1 characters), but in case you find one be aware that adding such a file to the ISO won't work.

You might want to use NCHARS_FILE_ID_MAX_STORE to set the length of your own variables storing filenames.

NCHARS_SYMLINK_TARGET_MAX

You probably won't need to use this one but I included it in the manual so you're aware of the limitation.

Symbolic links have a string target. You can see this target when you do ls. For example here mylink -> ../../realfile the target of the link mylink is ../../realfile

The maximum length of a symbolic link's target is different on different platforms. In bk it is currently set to 250+1. If bk is set to not follow symbolic links, adding one with a target longer than NCHARS_SYMLINK_TARGET_MAX-1 won't work.

BOOT_MEDIA_*

A boot record can be one of several types: no emulation (e.g. isolinux, Windows CDs), floppy emulation (usually DOS), and hard disk emulation (I don't know of any examples for this). When using bk to add a boot record to an ISO, you have to specify the type of the boot record. There is no way to programatically determine the type of boot record by looking at the file, the only way to pick the type that you want is to ask the user to choose.

You won't need to understand boot records if your application doesn't support adding/replacing boot records. Opening a bootable ISO with bk, modifying it and saving it will preserve the boot record.

The constants are: BOOT_MEDIA_NONE, BOOT_MEDIA_NO_EMULATION, BOOT_MEDIA_1_2_FLOPPY, BOOT_MEDIA_1_44_FLOPPY, BOOT_MEDIA_2_88_FLOPPY, and BOOT_MEDIA_HARD_DISK. The floppy boot record files must be of a certain size, respectively: 1228800 bytes, 1474560 bytes, and 2949120 bytes.