aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makefs/cd9660.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2011-08-10 19:12:21 +0000
committerMarius Strobl <marius@FreeBSD.org>2011-08-10 19:12:21 +0000
commit852f933d9d31a633ae416f0c1e020c5c01a4e9cd (patch)
tree6523aec50aaa1496802d456fb2481464a0719587 /usr.sbin/makefs/cd9660.c
parent1bf5a6cf3ce807b20dd2e360e2041078d4ace0e5 (diff)
downloadsrc-852f933d9d31a633ae416f0c1e020c5c01a4e9cd.tar.gz
src-852f933d9d31a633ae416f0c1e020c5c01a4e9cd.zip
Sync makefs(8) ISO 9660 support with NetBSD:
o cd9960 -> cd9660 o Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h since actual user is not cd9660_eltorito.c but iso.h and cd9660_eltorito.h. Actually, include order/place of sys/endian.h doesn't matter on netbsd since it is always included by sys/types.h but it's not true on other system. This should fix cross build breakage on freebsd introduced by rev. 1.16 of cd9660_eltorito.c. Problem reported and fix suggested on twitter. o Fix fd leaks in error cases. Found by cppcheck. o RRIP RE length should be 4, not 0 o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates corrupted cd9660fs), iso9660_rrip.c part: - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent, not in node itself in RRIP_PL case - cd9660_rrip_initialize_node() should update only node passed as arg so handle RRIP_PL in DOTDOT case Fixes malformed dotdot entries in deep (more than 8 level) directories moved into .rr_moved dir. Should be pulled up to netbsd-5. (no official ISO has such deep dirs, but cobalt restorecd is affected) Reviewed by: mm Approved by: re (kib) Obtained from: NetBSD MFC after: 3 days
Notes
Notes: svn path=/head/; revision=224762
Diffstat (limited to 'usr.sbin/makefs/cd9660.c')
-rw-r--r--usr.sbin/makefs/cd9660.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c
index 281a2038489c..44af9840bd27 100644
--- a/usr.sbin/makefs/cd9660.c
+++ b/usr.sbin/makefs/cd9660.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660.c,v 1.27 2010/10/27 18:51:34 christos 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
@@ -127,7 +127,7 @@ static int cd9660_setup_volume_descriptors(void);
static int cd9660_fill_extended_attribute_record(cd9660node *);
#endif
static void cd9660_sort_nodes(cd9660node *);
-static int cd9960_translate_node_common(cd9660node *);
+static int cd9660_translate_node_common(cd9660node *);
static int cd9660_translate_node(fsnode *, cd9660node *);
static int cd9660_compare_filename(const char *, const char *);
static void cd9660_sorted_child_insert(cd9660node *, cd9660node *);
@@ -809,7 +809,7 @@ cd9660_fill_extended_attribute_record(cd9660node *node)
#endif
static int
-cd9960_translate_node_common(cd9660node *newnode)
+cd9660_translate_node_common(cd9660node *newnode)
{
time_t tim;
int test;
@@ -846,7 +846,7 @@ cd9960_translate_node_common(cd9660node *newnode)
}
/*
- * Translate fsnode to cd9960node
+ * Translate fsnode to cd9660node
* Translate filenames and other metadata, including dates, sizes,
* permissions, etc
* @param struct fsnode * The node generated by makefs
@@ -875,7 +875,7 @@ cd9660_translate_node(fsnode *node, cd9660node *newnode)
if (!(S_ISDIR(node->type)))
newnode->fileDataLength = node->inode->st.st_size;
- if (cd9960_translate_node_common(newnode) == 0)
+ if (cd9660_translate_node_common(newnode) == 0)
return 0;
/* Finally, overwrite some of the values that are set by default */
@@ -2042,7 +2042,7 @@ cd9660_create_file(const char * name, cd9660node *parent, cd9660node *me)
return NULL;
*temp->node->inode = *me->node->inode;
- if (cd9960_translate_node_common(temp) == 0)
+ if (cd9660_translate_node_common(temp) == 0)
return NULL;
return temp;
}
@@ -2069,7 +2069,7 @@ cd9660_create_directory(const char *name, cd9660node *parent, cd9660node *me)
return NULL;
*temp->node->inode = *me->node->inode;
- if (cd9960_translate_node_common(temp) == 0)
+ if (cd9660_translate_node_common(temp) == 0)
return NULL;
return temp;
}