Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2013 12:27:54 -0500
From:      Kurt Lidl <lidl@pix.net>
To:        FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   makefs enhancement for better rock-ridge support
Message-ID:  <52B1DB1A.7000007@pix.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040000020509050202000503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

A while ago, it was reported that the ISO images that FreeBSD generates
have a variety of problems (thread starts here):

http://lists.freebsd.org/pipermail/freebsd-stable/2013-April/073050.html

And again for the 10.0 releases:

http://lists.freebsd.org/pipermail/freebsd-stable/2013-December/076284.html

Looking into this, it appears that the various bugs in the Rock Ridge
extensions have been fixed, except for the actual lack of recording
the "serial" numbers in the correct place of the Rock Ridge data.

As it turns out, it is almost trivial to fix this.

Patch is attached to this message, which will probably be stripped
out by the mailing list, but should be available as an attachment
from the mail server.

-Kurt

--------------040000020509050202000503
Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
 name="makefs.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="makefs.diff"

diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.c
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c
@@ -629,28 +629,29 @@ cd9660_createSL(cd9660node *node)
 			}
 		}
 	}
 }
 
 int
 cd9660node_rrip_px(struct ISO_SUSP_ATTRIBUTES *v, fsnode *pxinfo)
 {
-	v->attr.rr_entry.PX.h.length[0] = 36;
+	v->attr.rr_entry.PX.h.length[0] = 44;
 	v->attr.rr_entry.PX.h.version[0] = 1;
 	cd9660_bothendian_dword(pxinfo->inode->st.st_mode,
 	    v->attr.rr_entry.PX.mode);
 	cd9660_bothendian_dword(pxinfo->inode->st.st_nlink,
 	    v->attr.rr_entry.PX.links);
 	cd9660_bothendian_dword(pxinfo->inode->st.st_uid,
 	    v->attr.rr_entry.PX.uid);
 	cd9660_bothendian_dword(pxinfo->inode->st.st_gid,
 	    v->attr.rr_entry.PX.gid);
+	cd9660_bothendian_dword(pxinfo->inode->st.st_ino,
+	    v->attr.rr_entry.PX.serial);
 
-	/* Ignoring the serial number for now */
 	return 1;
 }
 
 int
 cd9660node_rrip_pn(struct ISO_SUSP_ATTRIBUTES *pn_field, fsnode *fnode)
 {
 	pn_field->attr.rr_entry.PN.h.length[0] = 20;
 	pn_field->attr.rr_entry.PN.h.version[0] = 1;
diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.h b/usr.sbin/makefs/cd9660/iso9660_rrip.h
--- a/usr.sbin/makefs/cd9660/iso9660_rrip.h
+++ b/usr.sbin/makefs/cd9660/iso9660_rrip.h
@@ -98,17 +98,17 @@
 #define SL_FLAGS_ROOT	        8
 
 typedef struct {
 	ISO_SUSP_HEADER		 h;
 	u_char mode		[ISODCL(5,12)];
 	u_char links		[ISODCL(13,20)];
 	u_char uid		[ISODCL(21,28)];
 	u_char gid		[ISODCL(29,36)];
-	u_char serial		[ISODCL(37,44)];/* Not used */
+	u_char serial		[ISODCL(37,44)];
 } ISO_RRIP_PX;
 
 typedef struct {
 	ISO_SUSP_HEADER		 h;
 	u_char high		[ISODCL(5,12)];
 	u_char low		[ISODCL(13,20)];
 } ISO_RRIP_PN;
 

--------------040000020509050202000503--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52B1DB1A.7000007>