From 10854bf51747c172e45e365995ccf42aef2ab470 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 10 Apr 2023 18:53:53 -0400 Subject: [PATCH] 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;