Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define _FILE_OFFSET_BITS 64
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
lseek(fd, offset, SEEK_SET);
bytesread = read(fd, aligned, bytes);
memcpy(buffer, aligned, bytesread);
+ free(unaligned);
/* Kludge. This is necessary to read/write the last
block of an odd-sized disk, until Linux 2.5.x kernel fixes.
memcpy(signature, &p->unique_partition_guid,
sizeof (p->unique_partition_guid));
} else {
- *start = 0;
- *size = last_lba(fd) + 1;
- memcpy(signature, &gpt->disk_guid, sizeof (gpt->disk_guid));
+ fprintf (stderr,"partition %d is not valid\n", num);
+ return 1;
}
return 0;
}