From: Bryce <philip.copeland@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Minor tweak to silo regarding GPT labeled drives
Date: Mon, 18 Jan 2016 18:17:34 +0000 [thread overview]
Message-ID: <569D2C3E.5060608@oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
I've been prompted by a couple of folk to pass along this minor patch for silo
Newer sparc firmware, mostly in the T4 and above range, along with sun(vtoc) now
support gpt labelled drives on the system boot drive (and theoretically some can
also support msdos? not tried it)
The problem with sillo is that it actively looks to see if a sun label magic is
written but GPT has no such 'magic' and silo would moan.
Phil
=--=
[-- Attachment #2: 0015-GPT-tweak.patch --]
[-- Type: text/x-patch, Size: 1295 bytes --]
From 5d5994b88513f2e45701460d275a2d29ab89c40b Mon Sep 17 00:00:00 2001
From: Dazed and confused <clueless@somewhere.com>
Date: Thu, 19 Feb 2015 05:58:30 -0800
Subject: [PATCH] GPT tweak
quietens silo about lack of a MAGIC for the GPT label
---
include/silo.h | 1 +
second/fs/iom.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/silo.h b/include/silo.h
index 94d6e31..135b79e 100644
--- a/include/silo.h
+++ b/include/silo.h
@@ -46,6 +46,7 @@ typedef struct {
} sun_partition;
#define SUN_LABEL_MAGIC 0xDABE
+#define GPT_LABEL_MAGIC 0x0000
struct silo_inode {
unsigned int inolen;
diff --git a/second/fs/iom.c b/second/fs/iom.c
index 28dd4b2..8629d36 100644
--- a/second/fs/iom.c
+++ b/second/fs/iom.c
@@ -37,8 +37,8 @@ static int read_sun_partition (int partno)
silo_fatal("Cannot read partition");
return 0;
}
- if (sdl.magic != SUN_LABEL_MAGIC)
- silo_fatal("Wrong disklabel magic");
+ if ((sdl.magic != SUN_LABEL_MAGIC) && (sdl.magic != GPT_LABEL_MAGIC))
+ printf("Wrong disklabel magic [0x%X]\n", (unsigned int) sdl.magic);
for (csum = 0, ush = ((unsigned short *) ((&sdl) + 1)) - 1; ush >= (unsigned short *) &sdl;)
csum ^= *ush--;
if (csum)
--
1.7.1
next reply other threads:[~2016-01-18 18:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 18:17 Bryce [this message]
2016-01-20 12:23 ` Minor tweak to silo regarding GPT labeled drives Anatoly Pugachev
2016-01-20 17:29 ` Sam Ravnborg
2016-01-20 17:40 ` Bryce
2016-01-20 18:29 ` Sam Ravnborg
2016-01-21 0:11 ` Anatoly Pugachev
2016-01-21 12:52 ` Anatoly Pugachev
2016-01-21 18:56 ` David Miller
2016-03-30 1:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=569D2C3E.5060608@oracle.com \
--to=philip.copeland@oracle.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.