diff options
Diffstat (limited to 'cdrwtool')
-rw-r--r-- | cdrwtool/Makefile.am | 2 | ||||
-rw-r--r-- | cdrwtool/Makefile.in | 8 | ||||
-rw-r--r-- | cdrwtool/cdrwtool.c | 2 | ||||
-rw-r--r-- | cdrwtool/cdrwtool.h | 33 | ||||
-rw-r--r-- | cdrwtool/main.c | 3 | ||||
-rw-r--r-- | cdrwtool/options.c | 8 | ||||
-rw-r--r-- | cdrwtool/options.h | 2 |
7 files changed, 25 insertions, 33 deletions
diff --git a/cdrwtool/Makefile.am b/cdrwtool/Makefile.am index 1d78c85..d647e55 100644 --- a/cdrwtool/Makefile.am +++ b/cdrwtool/Makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS = cdrwtool cdrwtool_LDADD = $(top_builddir)/libudffs/libudffs.la -cdrwtool_SOURCES = main.c options.c cdrwtool.c ../mkudffs/mkudffs.c ../mkudffs/defaults.c ../mkudffs/file.c options.h cdrwtool.h ../include/ecma_167.h ../include/osta_udf.h ../mkudffs/mkudffs.h ../mkudffs/defaults.h ../mkudffs/file.h ../include/libudffs.h ../include/udf_endian.h +cdrwtool_SOURCES = main.c options.c cdrwtool.c ../mkudffs/mkudffs.c ../mkudffs/defaults.c ../mkudffs/file.c options.h cdrwtool.h ../include/ecma_167.h ../include/osta_udf.h ../mkudffs/mkudffs.h ../mkudffs/defaults.h ../mkudffs/file.h ../include/libudffs.h AM_CPPFLAGS = -I$(top_srcdir)/include diff --git a/cdrwtool/Makefile.in b/cdrwtool/Makefile.in index 4797006..3341e0b 100644 --- a/cdrwtool/Makefile.in +++ b/cdrwtool/Makefile.in @@ -229,11 +229,17 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +UDEVDIR = @UDEVDIR@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ @@ -289,7 +295,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ cdrwtool_LDADD = $(top_builddir)/libudffs/libudffs.la -cdrwtool_SOURCES = main.c options.c cdrwtool.c ../mkudffs/mkudffs.c ../mkudffs/defaults.c ../mkudffs/file.c options.h cdrwtool.h ../include/ecma_167.h ../include/osta_udf.h ../mkudffs/mkudffs.h ../mkudffs/defaults.h ../mkudffs/file.h ../include/libudffs.h ../include/udf_endian.h +cdrwtool_SOURCES = main.c options.c cdrwtool.c ../mkudffs/mkudffs.c ../mkudffs/defaults.c ../mkudffs/file.c options.h cdrwtool.h ../include/ecma_167.h ../include/osta_udf.h ../mkudffs/mkudffs.h ../mkudffs/defaults.h ../mkudffs/file.h ../include/libudffs.h AM_CPPFLAGS = -I$(top_srcdir)/include all: all-am diff --git a/cdrwtool/cdrwtool.c b/cdrwtool/cdrwtool.c index 66f82a2..252de52 100644 --- a/cdrwtool/cdrwtool.c +++ b/cdrwtool/cdrwtool.c @@ -2,7 +2,7 @@ * cdrwtool - perform all sort of actions on a CD-R, CD-RW, and DVD-R drive. * * Copyright (c) 1999,2000 Jens Axboe <axboe@suse.de> - * Copyright (c) 2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu> + * Copyright (c) 2002 Ben Fennema * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/cdrwtool/cdrwtool.h b/cdrwtool/cdrwtool.h index af6aa64..aed38fd 100644 --- a/cdrwtool/cdrwtool.h +++ b/cdrwtool/cdrwtool.h @@ -10,7 +10,7 @@ #ifndef _CDRWTOOL_H #define _CDRWTOOL_H 1 -#include <inttypes.h> +#include <stdint.h> #include <linux/cdrom.h> #include "../include/libudffs.h" @@ -91,47 +91,29 @@ struct cdrw_disc struct udf_disc udf_disc; }; -#ifndef be16_to_cpu -#define be16_to_cpu(x) \ - ((uint16_t)( \ - (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ - (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) -#endif - -#ifndef be32_to_cpu -#define be32_to_cpu(x) \ - ((uint32_t)( \ - (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ - (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ - (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ - (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) -#endif - typedef struct disc_info { uint16_t length; -#if __BYTE_ORDER == __BIG_ENDIAN +#ifdef WORDS_BIGENDIAN unsigned char reserved1 : 3; unsigned char erasable : 1; unsigned char border : 2; unsigned char status : 2; -#elif __BYTE_ORDER == __LITTLE_ENDIAN +#else unsigned char status : 2; unsigned char border : 2; unsigned char erasable : 1; unsigned char reserved1 : 3; -#else -#error "<bits/endian.h> is wack" #endif uint8_t n_first_track; uint8_t n_sessions_l; uint8_t first_track_l; uint8_t last_track_l; -#if __BYTE_ORDER == __BIG_ENDIAN +#ifdef WORDS_BIGENDIAN unsigned char did_v : 1; unsigned char dbc_v : 1; unsigned char uru : 1; unsigned char reserved2 : 5; -#elif __BYTE_ORDER == __LITTLE_ENDIAN +#else unsigned char reserved2 : 5; unsigned char uru : 1; unsigned char dbc_v : 1; @@ -160,7 +142,7 @@ typedef struct track_info { uint8_t track_number_l; uint8_t session_number_l; uint8_t reserved1; -#if __BYTE_ORDER == __BIG_ENDIAN +#ifdef WORDS_BIGENDIAN uint8_t reserved2 : 2; uint8_t damage : 1; uint8_t copy : 1; @@ -173,7 +155,7 @@ typedef struct track_info { uint8_t reserved3 : 6; uint8_t lra_v : 1; uint8_t nwa_v : 1; -#elif __BYTE_ORDER == __LITTLE_ENDIAN +#else uint8_t track_mode : 4; uint8_t copy : 1; uint8_t damage : 1; @@ -237,6 +219,5 @@ int print_disc_track_info(int); void make_write_page(write_params_t *, struct cdrw_disc *); void print_params(write_params_t *); void cdrw_init_disc(struct cdrw_disc *); -int udf_set_version(struct udf_disc *, int); #endif /* _CDRWTOOL_H */ diff --git a/cdrwtool/main.c b/cdrwtool/main.c index 6f0b547..7df67b1 100644 --- a/cdrwtool/main.c +++ b/cdrwtool/main.c @@ -1,7 +1,7 @@ /* * main.c * - * Copyright (c) 2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu> + * Copyright (c) 2002 Ben Fennema * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -24,6 +24,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/cdrwtool/options.c b/cdrwtool/options.c index 91d222d..9f0d652 100644 --- a/cdrwtool/options.c +++ b/cdrwtool/options.c @@ -1,7 +1,7 @@ /* * options.c * - * Copyright (c) 2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu> + * Copyright (c) 2002 Ben Fennema * All rights reserved. * * This program is free software; you can redistribute it and/or modify @@ -24,11 +24,14 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "cdrwtool.h" #include "libudffs.h" #include "options.h" +#include "../mkudffs/mkudffs.h" + struct option long_options[] = { { "help", no_argument, NULL, OPT_HELP }, { "device", 1, NULL, 'd' }, @@ -105,7 +108,8 @@ void parse_args(int argc, char *argv[], struct cdrw_disc *disc, const char **dev } case 'v': { - if (udf_set_version(&disc->udf_disc, strtol(optarg, NULL, 16))) + int udf_rev = strtol(optarg, NULL, 16); + if (udf_rev < 0x0150 || udf_rev > 0x0201 || udf_set_version(&disc->udf_disc, udf_rev)) exit(1); printf("udf version set to 0x%04x\n", disc->udf_disc.udf_rev); break; diff --git a/cdrwtool/options.h b/cdrwtool/options.h index c67b43d..cbcd4dc 100644 --- a/cdrwtool/options.h +++ b/cdrwtool/options.h @@ -1,7 +1,7 @@ /* * options.h * - * Copyright (c) 2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu> + * Copyright (c) 2002 Ben Fennema * All rights reserved. * * This program is free software; you can redistribute it and/or modify |