Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makefs PR/45217: Martin Matuska: Use proper lengths...



details:   https://anonhg.NetBSD.org/src/rev/044b7b7b61b7
branches:  trunk
changeset: 768040:044b7b7b61b7
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 06 23:25:19 2011 +0000

description:
PR/45217: Martin Matuska: Use proper lengths to space pad fields and don't
overwrite them according to the spec.

diffstat:

 usr.sbin/makefs/cd9660.c |  17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diffs (50 lines):

diff -r 3b4d4fb84486 -r 044b7b7b61b7 usr.sbin/makefs/cd9660.c
--- a/usr.sbin/makefs/cd9660.c  Sat Aug 06 23:07:14 2011 +0000
+++ b/usr.sbin/makefs/cd9660.c  Sat Aug 06 23:25:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660.c,v 1.30 2011/05/29 17:07:57 tsutsui Exp $      */
+/*     $NetBSD: cd9660.c,v 1.31 2011/08/06 23:25:19 christos Exp $     */
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.30 2011/05/29 17:07:57 tsutsui Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.31 2011/08/06 23:25:19 christos Exp $");
 #endif  /* !__lint */
 
 #include <string.h>
@@ -231,13 +231,12 @@
        /* Make sure the PVD is clear */
        memset(&diskStructure.primaryDescriptor, 0, 2048);
 
-       memset(diskStructure.primaryDescriptor.volume_set_id,   0x20,32);
        memset(diskStructure.primaryDescriptor.publisher_id,    0x20,128);
        memset(diskStructure.primaryDescriptor.preparer_id,     0x20,128);
        memset(diskStructure.primaryDescriptor.application_id,  0x20,128);
-       memset(diskStructure.primaryDescriptor.copyright_file_id, 0x20,128);
-       memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,128);
-       memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,128);
+       memset(diskStructure.primaryDescriptor.copyright_file_id, 0x20,37);
+       memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,37);
+       memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,37);
 
        strcpy(diskStructure.primaryDescriptor.system_id,"NetBSD");
 
@@ -677,11 +676,11 @@
        cd9660_pad_string_spaces(diskStructure.primaryDescriptor.application_id,
            128);
        cd9660_pad_string_spaces(
-           diskStructure.primaryDescriptor.copyright_file_id, 128);
+           diskStructure.primaryDescriptor.copyright_file_id, 37);
        cd9660_pad_string_spaces(
-               diskStructure.primaryDescriptor.abstract_file_id, 128);
+               diskStructure.primaryDescriptor.abstract_file_id, 37);
        cd9660_pad_string_spaces(
-               diskStructure.primaryDescriptor.bibliographic_file_id, 128);
+               diskStructure.primaryDescriptor.bibliographic_file_id, 37);
 
        /* Setup dates */
        time(&tim);



Home | Main Index | Thread Index | Old Index