From nobody Thu Mar 30 22:27:48 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PndN50j3Sz42RX2; Thu, 30 Mar 2023 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PndN509HTz45FS; Thu, 30 Mar 2023 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680215269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDFGDqSLZIgc1IBSFhd7BcFSXpmpiFwBMivjnCSdjSA=; b=ntAN/44BMWPj6nztF8ah/ob/2Do/Tv4X4d+TblYGhmYKWOj8r3p70hyIFkZdz/B86zU6SV gdO2i73vVL6ok3WsNN5rXaL5p6e0M28S0b/0wMLm7IA1XDo81r6kBFQrFH9zvxQ7FpmpKa Pv3Vmepr3lmWOlRGPTsPUb0UUJ8TkRFeHvFUyJ0O+3HAYs+vNGRfwcF/yvDE39lJ5LxFh0 HFwsfh7MG22nU9vj96Oc6CnoAIyrDowJJCgrhT43Evr70jbMOY2EFx6ktCWnHID9MHjAt5 luk6a+BPwVmVeoYnczdy2Vg39Z+zBC4MD80uJB2Kuw55s3hiD30OVq0i6r4uxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680215269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HDFGDqSLZIgc1IBSFhd7BcFSXpmpiFwBMivjnCSdjSA=; b=jRPFb3H7xu2obGpN3FRxPv2VvzwS36EjyX+4fmtoyjS/vfr/CVLp2u2CbwVJSRumUCu3UP olY4Qp+3MSLKYu6OoNO4BAyEzp/W1h/TqcQxEqE9QaSU8zdAS//ZYvDeHe0IIeobEiNIPl cOBZ0GpbDMNatPN9svDbLOBXzVI+Dd0uyNqDQeWd5c6Rx7PYc94xQJmgqsbpZQvxg0MsLc tFie14uBEF0UGLwWTC3RipXl7bI+OrHR1CTo2I27X6btCprD48we8MK9b2q92mcKpaRb5e yLmoqPwZTZ1L2+M4fYuCQzCacnTywIlj88XKs9Q8JAcbyqHfJKUFt0SpUx8oqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680215269; a=rsa-sha256; cv=none; b=h+1YBgnSX+f8NCph9AgJ+hOKtJbaLUbMPgDz40jq0oOT2TGvLPkZKjp1ZXLB2+hMDr5dgH U69XVs3ZlHpDyOWIXzOeaJhCRpPzRP+tMEE4Fg9zAimjZSOvHP6KoTrockbQM5q4jPTE0q P5/kEfKHq37rMIQHn3KvGn+89XaATi9gD8WjLuQuDyX7KUXmFpbXqKDX7PP0ha7N8o57SI chlAd8oZS3nM8WE/maEID1xkB0Gfu2nEvKoAS2ZhfbTlpzDoFM5rBeL1acJnHUtURg/g1M zhfr/eftoL0NGdctMtfQn5ORTsgWPNL3gOHo31WS5Uo87tKkaoBDyuIKyjcAqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PndN46DNbzV2L; Thu, 30 Mar 2023 22:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32UMRmtb052455; Thu, 30 Mar 2023 22:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32UMRmVG052454; Thu, 30 Mar 2023 22:27:48 GMT (envelope-from git) Date: Thu, 30 Mar 2023 22:27:48 GMT Message-Id: <202303302227.32UMRmVG052454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f0bef3d20eb6 - main - makefs: #define Apple Partition bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0bef3d20eb6e28cf66a42c6d34fdfe80a784365 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f0bef3d20eb6e28cf66a42c6d34fdfe80a784365 commit f0bef3d20eb6e28cf66a42c6d34fdfe80a784365 Author: Ed Maste AuthorDate: 2023-03-30 16:45:18 +0000 Commit: Ed Maste CommitDate: 2023-03-30 22:27:30 +0000 makefs: #define Apple Partition bits NetBSD defines these in sys/bootblock.h, which we don't have. Add local defintions in cd9660_eltorito.c (as OpenBSD did) to reduce diffs between the three makefs implementations. Obtained from: OpenBSD Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/cd9660/cd9660_eltorito.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c index 0a57c91a659e..6d7a32378b64 100644 --- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c +++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c @@ -41,6 +41,14 @@ #include __FBSDID("$FreeBSD$"); +/* + * Partition Status Information from Apple Tech Note 1189 + */ +#define APPLE_PS_VALID 0x00000001 /* Entry is valid */ +#define APPLE_PS_ALLOCATED 0x00000002 /* Entry is allocated */ +#define APPLE_PS_READABLE 0x00000010 /* Entry is readable */ +#define APPLE_PS_WRITABLE 0x00000020 /* Entry is writable */ + #ifdef DEBUG #define ELTORITO_DPRINTF(__x) printf __x #else @@ -574,15 +582,8 @@ cd9660_write_apm_partition_entry(FILE *fd, int idx, int total_partitions, uint32_t apm32, part_status; uint16_t apm16; - /* See Apple Tech Note 1189 for the details about the pmPartStatus - * flags. - * Below the flags which are default: - * - IsValid 0x01 - * - IsAllocated 0x02 - * - IsReadable 0x10 - * - IsWritable 0x20 - */ - part_status = 0x01 | 0x02 | 0x10 | 0x20; + part_status = APPLE_PS_VALID | APPLE_PS_ALLOCATED | APPLE_PS_READABLE | + APPLE_PS_WRITABLE; if (fseeko(fd, (off_t)(idx + 1) * sector_size, SEEK_SET) == -1) err(1, "fseeko");