From: Juan Perez-Sanchez <lithoxs@gmail.com>
To: linux-8086 <linux-8086@vger.kernel.org>
Subject: [PATCH] Fix to fdisk command
Date: Sun, 7 Dec 2014 23:02:17 -0600 [thread overview]
Message-ID: <CAD6VGubt-SBCwHEhvnWiJyvf1pXEicAa4WH0WDiLbbKMDSEqEQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 165 bytes --]
Hi,
Disk partitions created with ELKS fdisk are not recognized by the
ELKS kernel because they lack a signature. This patch fixes the problem.
Greetings,
Juan
[-- Attachment #2: elksfdisk.patch --]
[-- Type: text/x-patch, Size: 694 bytes --]
diff -Nur elkscmd.orig/disk_utils/fdisk.c elkscmd/disk_utils/fdisk.c
--- elkscmd.orig/disk_utils/fdisk.c 2014-11-27 10:53:27.000000000 -0600
+++ elkscmd/disk_utils/fdisk.c 2014-12-07 22:49:38.609092220 -0600
@@ -314,12 +314,15 @@
if (lseek(pFd,0L,SEEK_SET)!=0)
printf("ERROR! Cannot seek to offset 0.\n");
- else
+ else {
+ partitiontable[510] = 0x55;
+ partitiontable[511] = 0xAA;
if ((i=write(pFd,partitiontable,512))!=512) {
printf("ERROR! Only wrote %d of 512 bytes to the partition table.\n",i);
printf(" Table possibly corrupted.\n");
} else
printf("Successfully wrote %d bytes to %s\n",i,dev);
+ }
fflush(stdout);
}
next reply other threads:[~2014-12-08 5:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 5:02 Juan Perez-Sanchez [this message]
2014-12-08 12:37 ` [PATCH] Fix to fdisk command Jody Bruchon
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=CAD6VGubt-SBCwHEhvnWiJyvf1pXEicAa4WH0WDiLbbKMDSEqEQ@mail.gmail.com \
--to=lithoxs@gmail.com \
--cc=linux-8086@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).