Commit graph

18 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
3ab4bd77dd 2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
* disk/scsi.c (grub_scsi_iterate): Fix a memory leak.
2010-03-05 15:29:28 +01:00
Vladimir 'phcoder' Serbinenko
61eb45eee7 Rename asprint into xasprintf and avsprintf into xvasprintf 2010-01-20 09:12:47 +01:00
Vladimir 'phcoder' Serbinenko
2d49abe9e7 merge mainline into asprintf 2010-01-20 07:36:17 +01:00
Robert Millan
58bc8bd5b1 2010-01-03 Robert Millan <rmh.grub@aybabtu.com>
* boot/i386/pc/boot.S: Update copyright year.
	* boot/i386/pc/cdboot.S: Likewise.
	* boot/i386/pc/diskboot.S: Likewise.
	* boot/i386/pc/lnxboot.S: Likewise.
	* boot/i386/pc/pxeboot.S: Likewise.
	* bus/pci.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/help.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/test.c: Likewise.
	* disk/dmraid_nvidia.c: Likewise.
	* disk/i386/pc/biosdisk.c: Likewise.
	* disk/ieee1275/nand.c: Likewise.
	* disk/ieee1275/ofdisk.c: Likewise.
	* disk/lvm.c: Likewise.
	* disk/raid.c: Likewise.
	* disk/raid6_recover.c: Likewise.
	* disk/scsi.c: Likewise.
	* fs/affs.c: Likewise.
	* fs/cpio.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/sfs.c: Likewise.
	* fs/udf.c: Likewise.
	* fs/ufs.c: Likewise.
	* fs/xfs.c: Likewise.
	* gencmdlist.sh: Likewise.
	* genmk.rb: Likewise.
	* include/grub/disk.h: Likewise.
	* include/grub/efi/api.h: Likewise.
	* include/grub/efi/efi.h: Likewise.
	* include/grub/efi/pe32.h: Likewise.
	* include/grub/elf.h: Likewise.
	* include/grub/fs.h: Likewise.
	* include/grub/i386/at_keyboard.h: Likewise.
	* include/grub/i386/pc/memory.h: Likewise.
	* include/grub/i386/pc/vbe.h: Likewise.
	* include/grub/i386/pci.h: Likewise.
	* include/grub/i386/tsc.h: Likewise.
	* include/grub/ieee1275/ieee1275.h: Likewise.
	* include/grub/ntfs.h: Likewise.
	* include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
	* include/grub/sparc64/libgcc.h: Likewise.
	* include/grub/symbol.h: Likewise.
	* include/grub/types.h: Likewise.
	* include/multiboot2.h: Likewise.
	* io/gzio.c: Likewise.
	* kern/device.c: Likewise.
	* kern/disk.c: Likewise.
	* kern/efi/efi.c: Likewise.
	* kern/efi/mm.c: Likewise.
	* kern/elf.c: Likewise.
	* kern/file.c: Likewise.
	* kern/i386/dl.c: Likewise.
	* kern/i386/pc/init.c: Likewise.
	* kern/i386/pc/startup.S: Likewise.
	* kern/ieee1275/ieee1275.c: Likewise.
	* kern/ieee1275/init.c: Likewise.
	* kern/main.c: Likewise.
	* kern/mm.c: Likewise.
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* kern/x86_64/dl.c: Likewise.
	* lib/hexdump.c: Likewise.
	* loader/efi/appleloader.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot2.c: Likewise.
	* loader/ieee1275/multiboot2.c: Likewise.
	* loader/multiboot2.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* normal/completion.c: Likewise.
	* normal/menu_entry.c: Likewise.
	* partmap/apple.c: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/hostfs.c: Likewise.
	* video/readers/png.c: Likewise.
2010-01-03 22:05:07 +00:00
Vladimir 'phcoder' Serbinenko
8b442f3f4c asprintf and snprintf support 2009-12-29 10:04:06 +01:00
carles
7fd0baee0f 2009-12-24 Carles Pina i Estany <carles@pina.cat>
* bus/usb/usbhub.c: Fix capitalization, fullstop and newlines in
	grub_errno calls.
	* commands/acpi.c: Likewise.
	* commands/blocklist.c: Likewise.
	* commands/efi/loadbios.c: Likewise.
	* commands/i386/pc/drivemap.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/memrw.c: Likewise.
	* commands/password.c: Likewise.
	* commands/videotest.c: Likewise.
	* disk/ata.c: Likewise.
	* disk/ata_pthru.c: Likewise.
	* disk/dmraid_nvidia.c: Likewise.
	* disk/ieee1275/nand.c: Likewise.
	* disk/ieee1275/ofdisk.c: Likewise.
	* disk/loopback.c: Likewise.
	* disk/lvm.c: Likewise.
	* disk/mdraid_linux.c: Likewise.
	* disk/raid.c: Likewise.
	* disk/raid6_recover.c: Likewise.
	* disk/scsi.c: Likewise.
	* efiemu/main.c: Likewise.
	* efiemu/mm.c: Likewise.
	* efiemu/pnvram.c: Likewise.
	* efiemu/symbols.c: Likewise.
	* font/font.c: Likewise.
	* fs/cpio.c: Likewise.
	* fs/hfsplus.c: Likewise.
	* fs/iso9660.c: Likewise.
	* fs/jfs.c: Likewise.
	* fs/minix.c: Likewise.
	* fs/ntfs.c: Likewise.
	* fs/ntfscomp.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* fs/ufs.c: Likewise.
	* fs/xfs.c: Likewise.
	* gettext/gettext.c: Likewise.
	* include/grub/auth.h: Likewise.
	* kern/elf.c: Likewise.
	* kern/file.c: Likewise.
	* kern/ieee1275/init.c: Likewise.
	* kern/ieee1275/mmap.c: Likewise.
	* kern/ieee1275/openfw.c: Likewise.
	* kern/powerpc/dl.c: Likewise.
	* kern/sparc64/dl.c: Likewise.
	* lib/arg.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/bsdXX.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/efi/xnu.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/multiboot.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot2.c: Likewise.
	* loader/i386/xnu.c: Likewise.
	* loader/ieee1275/multiboot2.c: Likewise.
	* loader/macho.c: Likewise.
	* loader/machoXX.c: Likewise.
	* loader/multiboot2.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.
	* loader/xnu.c: Likewise.
	* loader/xnu_resume.c: Likewise.
	* mmap/i386/pc/mmap.c: Likewise.
	* normal/menu_viewer.c: Likewise.
	* partmap/acorn.c: Likewise.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* script/lexer.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/terminfo.c: Likewise.
	* video/bitmap.c: Likewise.
	* video/efi_gop.c: Likewise.
	* video/efi_uga.c: Likewise.
	* video/fb/video_fb.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* video/readers/tga.c: Likewise.
	* video/video.c: Likewise.
2009-12-24 23:53:05 +01:00
robertmh
478df40933 2009-10-26 Robert Millan <rmh.grub@aybabtu.com>
* disk/scsi.c: Remove `<grub/machine/kernel.h>' (not needed).
2009-10-26 18:06:23 +00:00
phcoder
ee293aee1b 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
Fix hang and segmentation fault in grub-emu-usb

	* disk/scsi.c (grub_scsi_open): return err and not grub_errno
	* util/usb.c (grub_libusb_devices): likewise
	(grub_libusb_init): rename to ...
	(GRUB_MOD_INIT (libusb)):...this
	(grub_libusb_fini): rename to ..
	(GRUB_MOD_FINI (libusb)):...this
	* disk/usbms.c (grub_usbms_transfer): fix retry logic
	* include/grub/disk.h (grub_raid_init): removed, it's useless
	(grub_raid_fini): likewise
	(grub_lvm_init): likewise
	(grub_lvm_fini): likewise
	* util/grub-emu.c (main): don't call grub_libusb_init, it's done
	by grub_init_all
2009-07-16 15:36:43 +00:00
phcoder
3ac72b5131 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
* disk/scsi.c (grub_scsi_open): use continue instead of big if
2009-06-19 17:38:27 +00:00
fzielcke
b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
phcoder
5af922b5f1 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
Warning fix

	* disk/scsi.c (grub_scsi_open): added missing cast when 
	calling grub_dprintf
2009-04-27 15:39:39 +00:00
phcoder
a8c48fd53d 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
Leak fixes

      * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
      in case of collision
      * disk/scsi.c (grub_scsi_open): free scsi in case of error
2009-03-29 21:21:19 +00:00
robertmh
6e8c9c3a87 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
Don't leak in SCSI code.
        * disk/scsi.c (grub_scsi_close): free `scsi'.
2009-02-27 21:27:01 +00:00
chaac
6a7eab2c13 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
* disk/scsi.c (grub_scsi_read): Fix sign problem.

	* term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.

	* util/grub-mkfont.c (usage): Fix typo.

	* util/elf/grub-mkimage.c (load_modules): Fix warning.
2009-01-27 18:26:09 +00:00
chrfranke
1cfe20b333 2009-01-19 Christian Franke <franke@computer.org>
* disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
	of 512 to calculate data size.
	(grub_scsi_read12): Likewise.
	(grub_scsi_write10): Likewise.
	(grub_scsi_write12): Likewise.
	(grub_scsi_read): Adjust size according to blocksize.
	Add checks for invalid blocksize and unaligned transfer.
2009-01-19 20:27:54 +00:00
bean
c40fd116ea 2008-09-22 Bean <bean123ch@gmail.com>
* disk/ata.c (grub_apapi_open): Initialize devfnd, no need to set
	scsi->name and scsi->luns, as they will be set in grub_scsi_open.

	* disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
	error occurs, as grub_disk_open will call grub_disk_close, which will
	call p->close (scsi).
2008-09-22 03:49:26 +00:00
robertmh
9124f65de0 2008-09-03 Robert Millan <rmh@aybabtu.com>
* disk/scsi.c (grub_scsi_open): Remove size limit when printing
        `disk->total_sectors'.
2008-09-03 10:52:07 +00:00
marco_g
965c75ca69 2008-08-27 Marco Gerards <marco@gnu.org>
* conf/common.rmk (pkglib_MODULES): Add scsi.mod.
	(scsi_mod_SOURCES): New variable.
	(scsi_mod_CFLAGS): Likewise
	(scsi_mod_LDFLAGS): Likewise.

	* disk/scsi.c: New file.

	* include/grub/scsi.h: Likewise.

	* include/grub/scsicmd.h: Likewise.

	* disk/ata.c: Include <grub/scsi.h>.
	(grub_atapi_packet): Do not use grub_ata_cmd, use registers
	instead.
	(grub_ata_iterate): Skip ATAPI devices.
	(grub_ata_open): Only handle ATAPI devices.
	(struct grub_atapi_read): Removed.
	(grub_atapi_readsector): Likewise.
	(grub_ata_read): No longer handle ATAPI devices.
	(grub_ata_write): Likewise.
	(grub_atapi_iterate): New function.
	(grub_atapi_read): Likewise.
	(grub_atapi_write): Likewise.
	(grub_atapi_open): Likewise.
	(grub_atapi_close): Likewise.
	(grub_atapi_dev): New variable.
	(GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
	(GRUB_MOD_FINI(ata)): Unregister ATAPI.

	* include/grub/disk.h (enum grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_SCSI_ID'.
2008-08-27 15:05:00 +00:00