aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <james>2007-10-16 10:20:57 +0000
committerjames <james>2007-10-16 10:20:57 +0000
commitff1332aecd61c8bc4a363caf9bf739fd67a03aa2 (patch)
tree5df07e0b0c605660f868460a9d55d73728946c9b
parente9f42566d93f4ee49ccbccfd988aba5639fc0623 (diff)
downloadgpt-ff1332aecd61c8bc4a363caf9bf739fd67a03aa2.tar.gz
gpt-ff1332aecd61c8bc4a363caf9bf739fd67a03aa2.tar.bz2
gpt-ff1332aecd61c8bc4a363caf9bf739fd67a03aa2.zip
*** empty log message ***
-rw-r--r--src/disk.c2
-rw-r--r--src/gpt.c8
-rw-r--r--src/guid.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/disk.c b/src/disk.c
index a36a7df..3772862 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -45,7 +45,7 @@ disk_read (DISK * d, void *buf, uint64_t lba, int lbas)
if (read (d->fd, buf, lbas) != lbas)
{
perror ("read");
- abort ();
+ // abort ();
}
}
void
diff --git a/src/gpt.c b/src/gpt.c
index af68525..3759614 100644
--- a/src/gpt.c
+++ b/src/gpt.c
@@ -6,10 +6,13 @@
*
*/
-static char rcsid[] = "$Id: gpt.c,v 1.7 2007/10/16 10:07:49 james Exp $";
+static char rcsid[] = "$Id: gpt.c,v 1.8 2007/10/16 10:20:57 james Exp $";
/*
* $Log: gpt.c,v $
+ * Revision 1.8 2007/10/16 10:20:57 james
+ * *** empty log message ***
+ *
* Revision 1.7 2007/10/16 10:07:49 james
* *** empty log message ***
*
@@ -85,7 +88,8 @@ main (int argc, char *argv[])
break;
case 'e':
if (!d) usage();
- printf("%lld\n",(long long) disk_lbas(d));
+ h=headers_get(d);
+ printf("%lld\n",(long long) h.header.last_usable_lba);
return 0;
case 's':
if (!d) usage();
diff --git a/src/guid.c b/src/guid.c
index 1cd4642..b7d73cc 100644
--- a/src/guid.c
+++ b/src/guid.c
@@ -134,7 +134,7 @@ guid_random (void)
{
GUID ret;
- int fd = open ("/dev/random", O_RDONLY);
+ int fd = open ("/dev/urandom", O_RDONLY);
read (fd, &ret, sizeof (ret));
close (fd);
return ret;