Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2023 12:22:54 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 10854bf51747 - main - makefs: use unsigned and %u for rock_ridge_move_count
Message-ID:  <202304171222.33HCMswq039740@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=10854bf51747c172e45e365995ccf42aef2ab470

commit 10854bf51747c172e45e365995ccf42aef2ab470
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-10 22:53:53 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-17 12:21:28 +0000

    makefs: use unsigned and %u for rock_ridge_move_count
    
    For diff reduction against NetBSD's makefs.  Based on NetBSD git mirror
    commit 00991aee8248.
    
    With this change our makefs cd9660 support should be in sync up to
    NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace.").
    
    Sponsored by:   The FreeBSD Foundation
---
 usr.sbin/makefs/cd9660.c | 2 +-
 usr.sbin/makefs/cd9660.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c
index 4d82a8dc93a1..0c9be8274643 100644
--- a/usr.sbin/makefs/cd9660.c
+++ b/usr.sbin/makefs/cd9660.c
@@ -1255,7 +1255,7 @@ cd9660_rrip_move_directory(iso9660_disk *diskStructure, cd9660node *dir)
 		return NULL;
 
 	diskStructure->rock_ridge_move_count++;
-	snprintf(newname, sizeof(newname), "%08i",
+	snprintf(newname, sizeof(newname), "%08u",
 	    diskStructure->rock_ridge_move_count);
 
 	/* Point to old parent */
diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h
index f271e0425517..4cd8cd471672 100644
--- a/usr.sbin/makefs/cd9660.h
+++ b/usr.sbin/makefs/cd9660.h
@@ -249,7 +249,7 @@ typedef struct _iso9660_disk {
 	int rock_ridge_enabled;
 	/* Other Rock Ridge Variables */
 	char *rock_ridge_renamed_dir_name;
-	int rock_ridge_move_count;
+	unsigned rock_ridge_move_count;
 	cd9660node *rr_moved_dir;
 
 	int archimedes_enabled;



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