Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 23:16:13 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289899 - head/usr.sbin/makefs/cd9660
Message-ID:  <201510242316.t9ONGDJf003101@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Oct 24 23:16:13 2015
New Revision: 289899
URL: https://svnweb.freebsd.org/changeset/base/289899

Log:
  Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
  device nodes
  
  In particular, use st_rdev (the device type), not st_dev (the device inode),
  and fix the comparison to be correct with the st_rdev field
  
  Bug 203648
  MFC after: 2 weeks
  Submitted by: Thomas Schmitt <scdbackup@gmx.net>
  Coverity CID: 1008927
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/makefs/cd9660/iso9660_rrip.c

Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c
==============================================================================
--- head/usr.sbin/makefs/cd9660/iso9660_rrip.c	Sat Oct 24 22:37:59 2015	(r289898)
+++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c	Sat Oct 24 23:16:13 2015	(r289899)
@@ -1,4 +1,4 @@
-/*	$NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $	*/
+/*	$NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $	*/
 
 /*
  * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -656,13 +656,14 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI
 	pn_field->attr.rr_entry.PN.h.length[0] = 20;
 	pn_field->attr.rr_entry.PN.h.version[0] = 1;
 
-	if (sizeof (fnode->inode->st.st_dev) > 32)
-		cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32,
+	if (sizeof (fnode->inode->st.st_rdev) > 4)
+		cd9660_bothendian_dword(
+		    (uint64_t)fnode->inode->st.st_rdev >> 32,
 		    pn_field->attr.rr_entry.PN.high);
 	else
 		cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high);
 
-	cd9660_bothendian_dword(fnode->inode->st.st_dev & 0xffffffff,
+	cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0xffffffff,
 		pn_field->attr.rr_entry.PN.low);
 	return 1;
 }



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