Date: Thu, 26 Sep 2024 11:06:16 GMT From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d71e2c037c94 - main - nuageinit: Silence an fstyp(8) warning Message-ID: <202409261106.48QB6G4M063417@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db commit d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db Author: Jose Luis Duran <jlduran@gmail.com> AuthorDate: 2024-07-26 01:59:36 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2024-09-26 10:58:42 +0000 nuageinit: Silence an fstyp(8) warning Silence a warning emitted by fread(3) in fstyp(8)'s read_buf(), when detecting the file system type of the cloud-init device: % fstyp /dev/iso9660/cidata fstyp: fread: Invalid argument cd9660 Also rephrase slightly a comment while here. Signed-off-by: Jose Luis Duran <jlduran@gmail.com> --- libexec/rc/rc.d/nuageinit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/nuageinit b/libexec/rc/rc.d/nuageinit index 8da0b1aed741..a44761ea1d9e 100755 --- a/libexec/rc/rc.d/nuageinit +++ b/libexec/rc/rc.d/nuageinit @@ -18,8 +18,8 @@ nuageinit_start() { local citype # detect cloud init provider - # according to the specification of the config drive - # it either formatted in vfat or iso9660 and labeled + # according to the specification, the config drive + # is either formatted in vfat or iso9660 and labeled # config-2 for f in iso9660 msdosfs; do drive="/dev/$f/[cC][oO][nN][fF][iI][gG]-2" @@ -39,7 +39,7 @@ nuageinit_start() err 1 "Impossible to find a cloud init provider" fi mkdir -p /media/nuageinit - fs=$(fstyp $drive) + fs=$(fstyp $drive 2> /dev/null) mount -t $fs $drive /media/nuageinit # according to the specification, the content is either # in the openstack or ec2 directory
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409261106.48QB6G4M063417>