forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSPLINK - compile problem with new toolchain [FIX]

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
anhanguera



Joined: 26 Aug 2004
Posts: 31

PostPosted: Wed May 30, 2007 11:52 pm    Post subject: PSPLINK - compile problem with new toolchain [FIX] Reply with quote

hi,

thank you for such a nice tool. it runs perfect on FW.150 using usbhostfs. here is the small patch;
Code:

Index: usbhostfs/main.c
===================================================================
--- usbhostfs/main.c    (revision 2234)
+++ usbhostfs/main.c    (working copy)
@@ -459,8 +459,8 @@
 }

 /* Exchange a HOSTFS command with the PC host */
-int command_xchg(void *outcmd, int outcmdlen, void *incmd, int incmdlen, const void *outdata,
-               int outlen, void *indata, int inlen)
+int32_t command_xchg(void *outcmd, int32_t outcmdlen, void *incmd, int32_t incmdlen, const void *outdata,
+               int32_t outlen, void *indata, int32_t inlen)
 {
        struct HostFsCmd *cmd;
        struct HostFsCmd *resp;
@@ -485,7 +485,7 @@
                        err = write_data(outcmd, outcmdlen);
                        if(err != outcmdlen)
                        {
-                               MODPRINTF("Error writing command %08X %d\n", cmd->command, err);
+                               MODPRINTF("Error writing command %08X %d\n", (unsigned int) cmd->command, err);
                                break;
                        }
                }
@@ -495,7 +495,7 @@
                        err = write_data(outdata, outlen);
                        if(err != outlen)
                        {
-                               MODPRINTF("Error writing command data %08X, %d\n", cmd->command, err);
+                               MODPRINTF("Error writing command data %08X, %d\n", (unsigned int) cmd->command, err);
                                break;
                        }
                }
@@ -505,18 +505,18 @@
                        err = read_data(incmd, incmdlen);
                        if(err != incmdlen)
                        {
-                               MODPRINTF("Error reading response for %08X %d\n", cmd->command, err);
+                               MODPRINTF("Error reading response for %08X %d\n", (unsigned int) cmd->command, err);
                                break;
                        }

                        if((resp->magic != HOSTFS_MAGIC) && (resp->command != cmd->command))
                        {
-                               MODPRINTF("Invalid response packet magic: %08X, command: %08X\n", resp->magic, resp->command);
+                               MODPRINTF("Invalid response packet magic: %08X, command: %08X\n", (unsigned int) resp->magic, (unsigned int) resp->command);
                                break;
                        }

                        DEBUG_PRINTF("resp->magic %08X, resp->command %08X, resp->extralen %d\n",
-                                       resp->magic, resp->command, resp->extralen);
+                                       (unsigned int) resp->magic, (unsigned int) resp->command, resp->extralen);

                        /* TODO: Should add checks for inlen being less that extra len */
                        if((resp->extralen > 0) && (inlen > 0))
@@ -524,7 +524,7 @@
                                err = read_data(indata, resp->extralen);
                                if(err != resp->extralen)
                                {
-                                       MODPRINTF("Error reading input data %08X, %d\n", cmd->command, err);
+                                       MODPRINTF("Error reading input data %08X, %d\n", (unsigned int) cmd->command, err);
                                        break;
                                }
                        }
@@ -617,7 +617,7 @@
 }

 /* Call to ensure we are connected to the USB host */
-int usb_connected(void)
+int32_t usb_connected(void)
 {
        return g_connected;
 }
Index: usbhostfs/host_driver.c
===================================================================
--- usbhostfs/host_driver.c     (revision 2234)
+++ usbhostfs/host_driver.c     (working copy)
@@ -1034,7 +1034,7 @@
        "host", 0x10, 0x800, "HOST", &host_funcs
 };

-int hostfs_init(void)
+int32_t hostfs_init(void)
 {
        int ret;



anhanguera.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group