/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* @(#)labelit.c 1.1 90/01/22 SMI */ /* * Copyright (c) 1989, 1990 by Sun Microsystems, Inc. * */ /* * labelit [option=value ...] cdimage * where options are: sysid system identifier (a characters, 32 max) volid: volume identifier (d-characters, 32 max) volsetid: volume set identifier (d-characters, 128 max) pubid: publisher identifier (d-characters, 128 max) prepid: data preparer identifier (d-charcter, 128 max) applid: application identifier (d-charcter, 128 max) copyfile: copyright file identifier (d-characters, 128 max) absfile: abstract file identifier (d-characters, 37 max) bibfile: bibliographic file identifier (d-charcters, 37 max) */ #pragma ident "%Z%%M% %I% %E% SMI" #include #include #include #include #include #include #include #include #include "hsfs_spec.h" #include "iso_spec.h" #include "iso_impl.h" #define PUTSECTOR(buf, secno, nosec) (putdisk(buf, (secno)*ISO_SECTOR_SIZE, \ (nosec)*ISO_SECTOR_SIZE)) #define GETSECTOR(buf, secno, nosec) (getdisk(buf, (secno)*ISO_SECTOR_SIZE, \ (nosec)*ISO_SECTOR_SIZE)) char *string; #define MAXERRSTRNG 80 char errstrng[MAXERRSTRNG]; char callname[160]; int cdfd; int cd_type; char hs_buf[ISO_SECTOR_SIZE]; int hs_pvd_sec_no; char iso_buf[ISO_SECTOR_SIZE]; int iso_pvd_sec_no; char unix_buf[ISO_SECTOR_SIZE]; int unix_pvd_sec_no; char *vdp; char *sysid; char *volid; char *volsetid; char *pubid; char *prepid; char *applid; char *copyfile; char *absfile; char *bibfile; int volsetsize; int volsetseq; int blksize; int volsize; main(argc, argv) int argc; char **argv; { register c; int openopt; strcpy(callname, argv[0]); for(c=1; c= 0; i--) if (s[i] != ' ') break; maxlen = i+1; for (i=0;i