* [PATCH] Fix to fdisk command
@ 2014-12-08 5:02 Juan Perez-Sanchez
2014-12-08 12:37 ` Jody Bruchon
0 siblings, 1 reply; 2+ messages in thread
From: Juan Perez-Sanchez @ 2014-12-08 5:02 UTC (permalink / raw)
To: linux-8086
[-- 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);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-08 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-08 5:02 [PATCH] Fix to fdisk command Juan Perez-Sanchez
2014-12-08 12:37 ` Jody Bruchon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox