diff options
author | brian <brian@FreeBSD.org> | 2001-09-23 08:52:44 +0800 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-09-23 08:52:44 +0800 |
commit | 38cb309a9c76e22b8a5747ddc19e86d558244b9d (patch) | |
tree | 94a0ed1d17977d15a634472a7cd6285377006c45 /sysutils | |
parent | a139748480672292d582487abaf317b1f02f1ac7 (diff) | |
download | freebsd-ports-gnome-38cb309a9c76e22b8a5747ddc19e86d558244b9d.tar.gz freebsd-ports-gnome-38cb309a9c76e22b8a5747ddc19e86d558244b9d.tar.zst freebsd-ports-gnome-38cb309a9c76e22b8a5747ddc19e86d558244b9d.zip |
constify dvdtape.c
Correct format arguments for unsigned long longs;
In printf, use %llu
In sscanf, use %qu
These were both previously using %Ld...
This fixes generation of DVDs >4Gb in size.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/dvdtape/Makefile | 1 | ||||
-rw-r--r-- | sysutils/dvdtape/files/patch-ab | 84 |
2 files changed, 85 insertions, 0 deletions
diff --git a/sysutils/dvdtape/Makefile b/sysutils/dvdtape/Makefile index 1a5f50c6ca20..abaa5fe06b8c 100644 --- a/sysutils/dvdtape/Makefile +++ b/sysutils/dvdtape/Makefile @@ -7,6 +7,7 @@ PORTNAME= dvdtape PORTVERSION= 1.6 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.Awfulhak.org/pub/dvdtape/ \ http://people.FreeBSD.org/~brian/dvdtape/ \ diff --git a/sysutils/dvdtape/files/patch-ab b/sysutils/dvdtape/files/patch-ab new file mode 100644 index 000000000000..c9053db248dc --- /dev/null +++ b/sysutils/dvdtape/files/patch-ab @@ -0,0 +1,84 @@ +--- dvdtape.c.orig Sat Jul 7 06:00:32 2001 ++++ dvdtape.c Sun Sep 23 00:16:29 2001 +@@ -61,12 +61,12 @@ + static int combined_length_specified = 0; + static unsigned long long layer_length = 0; + static int length_specified = 0; +-static char *owner = ""; +-static char *usertext = ""; +-static char *input_filename = NULL; +-static char *control_filename = NULL; +-static char *control_output_filename = NULL; +-static char *output_filename = "/dev/st0"; ++static const char *owner = ""; ++static const char *usertext = ""; ++static const char *input_filename = NULL; ++static const char *control_filename = NULL; ++static const char *control_output_filename = NULL; ++static const char *output_filename = "/dev/st0"; + static char time_string[7]; + static char track_path; /* Direction of translation for second layer. + I = inward, parallel to first layer. +@@ -135,7 +135,7 @@ + options, NULL)) != -1) { + switch (opt) { + case 'C': +- if (sscanf(optarg,"%Ld",&combined_length)!=1) { ++ if (sscanf(optarg,"%qu",&combined_length)!=1) { + fprintf (stderr, + "%s: not an integer\n", + optarg); +@@ -166,7 +166,7 @@ + break; + case 'N': control_output_filename = optarg; break; + case 'o': +- if (sscanf(optarg, "%Ld", &offset) != 1) { ++ if (sscanf(optarg, "%qu", &offset) != 1) { + fprintf (stderr, + "%s: not an integer\n", + optarg); +@@ -208,7 +208,7 @@ + break; + case 'u': usertext = optarg; break; + case 'b': +- if (sscanf(optarg, "%Ld", &layer_length) != 1) { ++ if (sscanf(optarg, "%qu", &layer_length) != 1) { + fprintf (stderr, + "%s: not an integer\n", + optarg); +@@ -350,7 +350,7 @@ + } + + static void +-write_hdr1(int outfd, char *labelid, char *fileid, int block_count) { ++write_hdr1(int outfd, const char *labelid, const char *fileid, int block_count) { + char buf[81]; + sprintf(buf, + "%-4.4s" /* Label ID */ +@@ -393,7 +393,7 @@ + } + + static void +-write_hdr2(int outfd, char *labelid, int blocksize, int recordsize) { ++write_hdr2(int outfd, const char *labelid, int blocksize, int recordsize) { + char buf[81]; + sprintf(buf, + "%-4.4s" /* Label ID */ +@@ -455,7 +455,7 @@ + } + + static void +-write_ddpms(int outfd, char *streamtype, int start, int len, char *filename) { ++write_ddpms(int outfd, const char *streamtype, int start, int len, const char *filename) { + char buf[129]; + sprintf(buf, + "VVVM" /* MPV Map Packet Valid */ +@@ -680,7 +680,7 @@ + exit(1); + } + guess_length_and_offset(infd); +- fprintf (stderr, "Writing %Lu bytes of DVD image starting at offset %Lu (layer %d of %d).\n", layer_length, offset, layer+1, layers); ++ fprintf (stderr, "Writing %llu bytes of DVD image starting at offset %llu (layer %d of %d).\n", layer_length, offset, layer+1, layers); + if ((outfd = open (output_filename, O_WRONLY|O_CREAT, 0644)) < 0) { + perror(output_filename); + exit(1); |