⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkisofs.c

📁 刻录光盘的程序
💻 C
📖 第 1 页 / 共 4 页
字号:
#endif	};	break;      case 'A':	appid = optarg;	if(strlen(appid) > 128) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Application-id string too long\n");#else		fprintf(stderr, "Application-id string too long\n");		exit(1);#endif	};	break;      case OPTION_BIBLIO:	biblio = optarg;	if(strlen(biblio) > 37) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Bibliographic filename string too long\n");#else		fprintf(stderr, "Bibliographic filename string too long\n");		exit(1);#endif	};	break;      case OPTION_COPYRIGHT:	copyright = optarg;	if(strlen(copyright) > 37) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Copyright filename string too long\n");#else		fprintf(stderr, "Copyright filename string too long\n");		exit(1);#endif	};	break;      case 'd':	omit_period++;	break;      case 'D':	RR_relocation_depth = 32767;	break;      case 'f':	follow_links++;	break;      case 'l':	full_iso9660_filenames++;	break;      case 'L':        allow_leading_dots++;        break;     case OPTION_LOG_FILE:	log_file = optarg;	break;      case 'M':	merge_image = optarg;	break;      case 'N':	omit_version_number++;	break;      case OPTION_NO_RR:	no_rr++;	break;      case 'o':	outfile = optarg;	break;      case OPTION_P_LIST:	pathnames = optarg;	break;      case 'p':	preparer = optarg;	if(strlen(preparer) > 128) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Preparer string too long\n");#else		fprintf(stderr, "Preparer string too long\n");		exit(1);#endif	};	break;      case OPTION_PRINT_SIZE:	print_size++;	break;      case 'P':	publisher = optarg;	if(strlen(publisher) > 128) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Publisher string too long\n");#else		fprintf(stderr, "Publisher string too long\n");		exit(1);#endif	};	break;      case OPTION_QUIET:	verbose = 0;	break;      case 'R':	use_RockRidge++;	break;      case 'r':	rationalize++;	use_RockRidge++;	break;      case OPTION_SPLIT_OUTPUT:	split_output++;	break;      case OPTION_SYSID:	system_id = optarg;	if(strlen(system_id) > 32) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "System ID string too long\n");#else		fprintf(stderr, "System ID string too long\n");		exit(1);#endif	};	break;      case OPTION_TRANS_TBL:	trans_tbl = optarg;	/* fall through */      case 'T':	generate_tables++;	break;       case 'U': 	allow_untranslated++; 	omit_period++; 	full_iso9660_filenames++; 	allow_leading_dots++; 	omit_version_number++; 	break;      case 'V':	volume_id = optarg;	if(strlen(volume_id) > 32) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Volume ID string too long\n");#else		fprintf(stderr, "Volume ID string too long\n");		exit(1);#endif	};	break;      case OPTION_VOLSET:	volset_id = optarg;	if(strlen(volset_id) > 128) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Volume set ID string too long\n");#else		fprintf(stderr, "Volume set ID string too long\n");		exit(1);#endif	};	break;      case OPTION_VOLSET_SIZE:	volume_set_size = atoi(optarg);	break;      case OPTION_VOLSET_SEQ_NUM:	volume_sequence_number = atoi(optarg);	if (volume_sequence_number > volume_set_size) {#ifdef	USE_LIBSCHILY		comerrno(EX_BAD, "Volume set sequence number too big\n");#else		fprintf(stderr, "Volume set sequence number too big\n");		exit(1);#endif	}	break;      case 'v':	verbose++;	break;      case 'z':#ifdef VMS#ifdef	USE_LIBSCHILY	comerrno(EX_BAD, "Transparent compression not supported with VMS\n");#else	fprintf(stderr, "Transparent compression not supported with VMS\n");	exit(1);#endif#else	transparent_compression++;#endif	break;      case 'x':      case 'm':	/*	 * Somehow two options to do basically the same thing got added somewhere along	 * the way.  The 'match' code supports limited globbing, so this is the one	 * that got selected.  Unfortunately the 'x' switch is probably more intuitive.	 */        add_match(optarg);	break;      case OPTION_X_LIST:	add_list(optarg);	break;      case OPTION_I_HIDE:	i_add_match(optarg);	break;      case OPTION_I_LIST:	i_add_list(optarg);	break;      case OPTION_J_HIDE:	j_add_match(optarg);	break;      case OPTION_J_LIST:	j_add_list(optarg);	break;      case OPTION_HIDE_TRANS_TBL:	jhide_trans_tbl++;	break;      case OPTION_HIDE_RR_MOVED:	hide_rr_moved++;	break;      case OPTION_HELP:	usage(0);	break;      case OPTION_PVERSION:	printf("%s (%s-%s-%s)\n", version_string, HOST_CPU, HOST_VENDOR, HOST_OS);	exit (0);	break;      case OPTION_NOSPLIT_SL_COMPONENT:	split_SL_component = 0;	break;      case OPTION_NOSPLIT_SL_FIELD:	split_SL_field = 0;	break;      case OPTION_HARD_DISK_BOOT:	use_eltorito++;	hard_disk_boot++;	break;      case OPTION_NO_EMUL_BOOT:	use_eltorito++;	no_emul_boot++;	break;      case OPTION_NO_BOOT:	use_eltorito++;	not_bootable++;	break;      case OPTION_BOOT_LOAD_ADDR:	use_eltorito++;	{		long val;		char *ptr;				val = strtol(optarg, &ptr, 0);		if(*ptr || val < 0 || val >= 0x10000) {#ifdef	USE_LIBSCHILY			comerrno(EX_BAD, "Boot image load address invalid.\n");#else			fprintf(stderr, "Boot image load address invalid.\n");			exit(1);#endif		}		load_addr = val;	}	break;      case OPTION_BOOT_LOAD_SIZE:	use_eltorito++;	{		long val;		char *ptr;				val = strtol(optarg, &ptr, 0);		if(*ptr || val < 0 || val >= 0x10000) {#ifdef	USE_LIBSCHILY			comerrno(EX_BAD, "Boot image load size invalid.\n");#else			fprintf(stderr, "Boot image load size invalid.\n");			exit(1);#endif		}		load_size = val;	}	break;      case OPTION_BOOT_INFO_TABLE:	use_eltorito++;	boot_info_table++;	break;      default:	usage(1);      }parse_input_files:  if( merge_image != NULL )    {      if (open_merge_image(merge_image) < 0)	{	  /*	   * Complain and die.	   */#ifdef	USE_LIBSCHILY	  comerr("Unable to open previous session image %s\n",		  merge_image);#else	  fprintf(stderr,"Unable to open previous session image %s\n",		  merge_image);	  exit(1);#endif	}    }	/*	 * We don't need root privilleges anymore.	 */#ifdef	HAVE_SETREUID	if (setreuid(-1, getuid()) < 0)#else#ifdef	HAVE_SETEUID	if (seteuid(getuid()) < 0)#else	if (setuid(getuid()) < 0)#endif#endif#ifdef	USE_LIBSCHILY		comerr("Panic cannot set back efective uid.\n");#else		{perror("Panic cannot set back efective uid.");exit(1);}#endif#ifdef	no_more_needed#ifdef __NetBSD__    {	int resource;    struct rlimit rlp;	if (getrlimit(RLIMIT_DATA,&rlp) == -1) 		perror("Warning: getrlimit");	else {		rlp.rlim_cur=33554432;		if (setrlimit(RLIMIT_DATA,&rlp) == -1)			perror("Warning: setrlimit");		}	}#endif#endif	/* no_more_needed */#ifdef HAVE_SBRK  mem_start = (unsigned long) sbrk(0);#endif  /* if the -hide-joliet option has been given, set the Joliet option */  if (!use_Joliet && j_ishidden())    use_Joliet++;  if(verbose > 1) fprintf(stderr,"%s (%s-%s-%s)\n", version_string, HOST_CPU, HOST_VENDOR, HOST_OS);  if(cdrecord_data == NULL && merge_image != NULL)    {#ifdef	USE_LIBSCHILY      comerrno(EX_BAD, "Multisession usage bug: Must specify -C if -M is used.\n");#else      fprintf(stderr, "Multisession usage bug: Must specify -C if -M is used.\n");      exit(1);#endif    }  if(cdrecord_data != NULL && merge_image == NULL)    {#ifdef	USE_LIBSCHILY      errmsgno(EX_BAD, "Warning: -C specified without -M: old session data will not be merged.\n");#else      fprintf(stderr, "Warning: -C specified without -M: old session data will not be merged.\n");#endif    }  /*  The first step is to scan the directory tree, and take some notes */  if(!argv[optind]) {#ifdef	USE_LIBSCHILY	errmsgno(EX_BAD, "Missing pathspec.\n");#endif	usage(1);  }  if(use_RockRidge){#if 1	extension_record = generate_rr_extension_record("RRIP_1991A",				       "THE ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS",				       "PLEASE CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE.  SEE PUBLISHER IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION.", &extension_record_size);#else	extension_record = generate_rr_extension_record("IEEE_P1282",				       "THE IEEE P1282 PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS",				       "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT, PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION.", &extension_record_size);#endif  }  if (log_file) {    FILE *lfp;    int i;    /* open log file - test that we can open OK */    if ((lfp = fopen(log_file, "w")) == NULL) {#ifdef	USE_LIBSCHILY      comerr("can't open logfile: %s\n", log_file);#else      fprintf(stderr,"can't open logfile: %s\n", log_file);      exit (1);#endif    }    fclose(lfp);    /* redirect all stderr message to log_file */    fprintf(stderr, "re-directing all messages to %s\n", log_file);    fflush(stderr);    /* associate stderr with the log file */    if (freopen(log_file, "w", stderr) == NULL) {#ifdef	USE_LIBSCHILY      comerr("can't open logfile: %s\n", log_file);#else      fprintf(stderr,"can't open logfile: %s\n", log_file);      exit (1);#endif    }    if(verbose > 1) {      for (i=0;i<argc;i++)       fprintf(stderr,"%s ", argv[i]);      fprintf(stderr,"\n%s (%s-%s-%s)\n", version_string, HOST_CPU, HOST_VENDOR, HOST_OS);    }  }  /*   * Find name of root directory.   */  node = strchr(argv[optind], '=');  if ( node == NULL ) {    node = argv[optind];  } else {    ++node;  }  /*   * See if boot catalog file exists in root directory, if not   * we will create it.   */  if (use_eltorito)    init_boot_catalog(node);  /*   * Find the device and inode number of the root directory.   * Record this in the hash table so we don't scan it more than   * once.   */  stat_filter(node, &statbuf);  add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf));  memset(&de, 0, sizeof(de));  de.filedir = root;  /* We need this to bootstrap */  if (cdrecord_data != NULL && merge_image == NULL) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -