Linux-kernel mailing list archive 2000-32,: [PATCH] Re: 2.4.0-test6-pre8: fs/umsdos/emd.c still broke

# [PATCH] Re: 2.4.0-test6-pre8: fs/umsdos/emd.c still broke

Jeff Garzik (jgarzik@mandrakesoft.com)
Tue, 08 Aug 2000 18:54:58 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Lombard: "Re: 2.2.16: Kernel Panic on Pentium III 700MHz (Coppermine)"
- Previous message: Jeff Garzik: "Re: [PATCH] Fix test-2.4.0-pre8 compilation (was Re: test-2.4.0-pre8)"
- Maybe in reply to: Frank van Maarseveen: "2.4.0-test6-pre8: fs/umsdos/emd.c still broke"

This is a multi-part message in MIME format.
--------------D3554FFB4D52D91A2CA649EF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Frank van Maarseveen wrote:
>
> emd.c: In function `umsdos_emd_dir_readentry':
> emd.c:145: invalid operands to binary -
> emd.c: In function `umsdos_writeentry':
> emd.c:264: invalid operands to binary -
> emd.c:264: invalid operands to binary -
> emd.c:264: invalid operands to binary -
>
> Due to the removal of a few type casts as far as I can see.

Yeah, here is the obvious fix (compiled ok, but not tested)...

    --
    Jeff Garzik              |
    Building 1024            | Andre the Giant has a posse.
    MandrakeSoft, Inc.       |
    --------------D3554FFB4D52D91A2CA649EF
    Content-Type: text/plain; charset=us-ascii;
     name="umsdos.patch"
    Content-Transfer-Encoding: 7bit
    Content-Disposition: inline;
     filename="umsdos.patch"

    Index: fs/umsdos/emd.c
    ===================================================================
    RCS file: /g/cvslan/linux_2_3/fs/umsdos/emd.c,v
    retrieving revision 1.1.1.6
    diff -u -r1.1.1.6 emd.c
    --- fs/umsdos/emd.c	2000/08/06 21:26:13	1.1.1.6
    +++ fs/umsdos/emd.c	2000/08/08 22:54:08
    @@ -142,7 +142,7 @@
     	recsize = umsdos_evalrecsize(p->name_len);
     	if (offs + recsize > PAGE_CACHE_SIZE) {
     		struct page *page2;
    -		int part = (page_address(page) + PAGE_CACHE_SIZE) - p->spare;
    +		int part = ((char*)page_address(page) + PAGE_CACHE_SIZE) - p->spare;
     		page2 = read_cache_page(mapping, 1+(*pos>>PAGE_CACHE_SHIFT),
     				(filler_t*)mapping->a_ops->readpage, NULL);
     		if (IS_ERR(page2)) {
    @@ -261,7 +261,7 @@
     		p->rdev = cpu_to_le16(entry->rdev);
     		p->mode = cpu_to_le16(entry->mode);
     		memcpy(p->name,entry->name,
    -			(page_address(page) + PAGE_CACHE_SIZE) - p->spare);
    +			((char*)page_address(page) + PAGE_CACHE_SIZE) - p->spare);
     		memcpy(page_address(page2),
     				entry->spare+PAGE_CACHE_SIZE-offs,
     				offs+info->recsize-PAGE_CACHE_SIZE);

    --------------D3554FFB4D52D91A2CA649EF--

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

- Next message: David Lombard: "Re: 2.2.16: Kernel Panic on Pentium III 700MHz (Coppermine)"
- Previous message: Jeff Garzik: "Re: [PATCH] Fix test-2.4.0-pre8 compilation (was Re: test-2.4.0-pre8)"
- Maybe in reply to: Frank van Maarseveen: "2.4.0-test6-pre8: fs/umsdos/emd.c still broke"