Jump to content











Photo
- - - - -

Devio minor problems


  • Please log in to reply
4 replies to this topic

#1 slothman

slothman

    Newbie

  • Members
  • 29 posts
  •  
    United States

Posted 30 June 2007 - 12:45 AM

Hello Olof,

First I wish to thank you tremendously for writing such an awesome software called imdisk. I am using it on my PE cds and all my computers.

The problem I am having is that devio will not compile on any of my linux livecds. I know you said you would work on this later, but I was just wondering if you know what might cause these issues.

Basically I get 1 warning each about pread and pwrite for a total of 2 warnings. Implicit Declaration warnings. I read about these and supposedly the main culprit is missing header files. Well I looked in devio and safeio .c files and they are both including unistd.h which defines pread and pwrite. So I don't know why it is giving a warning about each of those.

Btw your devio.exe works great! Used it already to clone an xp install. Real nice transfer speeds too.

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1365 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 30 June 2007 - 07:30 PM

The problem I am having is that devio will not compile on any of my linux livecds. I know you said you would work on this later, but I was just wondering if you know what might cause these issues.

I have not tested the latest versions of devio on Linux so there might be some problems. I seem to recall that there were some troubles getting pread/pwrite calls to compile correctly on different *nix-es.

Basically I get 1 warning each about pread and pwrite for a total of 2 warnings. Implicit Declaration warnings. I read about these and supposedly the main culprit is missing header files. Well I looked in devio and safeio .c files and they are both including unistd.h which defines pread and pwrite. So I don't know why it is giving a warning about each of those.

It could be that the safeio.h files incorrectly assumes that your Linux does not have native support for pread/pwrite and therefore tries to define macros for them or something like that. Currently devio seems to compile fine on FreeBSD and Interix. I am working on a Live-CD with devio but it is based on FreeBSD, not Linux, so it is probably a bit different. Actually the Live-CD already exists, I have it working, all that is needed are some instructions about how to download and modify the FreeSBIE Live-CD to support devio and other my other support tools.

Btw your devio.exe works great! Used it already to clone an xp install. Real nice transfer speeds too.

Thank you! :1st:

#3 slothman

slothman

    Newbie

  • Members
  • 29 posts
  •  
    United States

Posted 30 June 2007 - 08:18 PM

Hello again Olof,

I think I figured it out. unistd.h wants to see a #define __USE_UNIX98 to properly use pread/pwrite

So adding a define after the #else //UNIX

appears to make it compile cleanly. But....It still doesn't work for some reason. It always gives a "Error creating virtual disk: The parameter is incorrect"

I have no idea what that's about, but it dies instantly after connecting with that. And yes I tried many different -o options, none of them seem to have an effect.

EDIT:
Well it appears to really work, I wasn't reading the help for devio fully. Mostly the part where it says on platforms besides windows, you need to specify the total size. So after specifying the size, it works flawlessly. Excellent :1st:

Attached is a static linux binary for everyone to enjoy (well everyone who registered for the forum anyway)
Attached File  devio.zip   165.24KB   419 downloads

EDIT 2:
I forgot to mention that I needed to change the int i; in main() to unsigned int i; as it was complaining about that as well.

#4 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1365 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 01 July 2007 - 03:58 PM

I think I figured it out. unistd.h wants to see a #define __USE_UNIX98 to properly use pread/pwrite

So adding a define after the #else //UNIX

appears to make it compile cleanly.

I forgot to mention that I needed to change the int i; in main() to unsigned int i; as it was complaining about that as well.

Okay, I will add these changes to the sources then. Thanks for testing and sharing your solution! :1st:

Just for information, I keep a static FreeBSD binary (bzip2-compressed) here:
http://www.ltr-data.se/files/devio.bz2

#5 slothman

slothman

    Newbie

  • Members
  • 29 posts
  •  
    United States

Posted 02 July 2007 - 08:36 PM

Okay, I will add these changes to the sources then. Thanks for testing and sharing your solution! :thumbup:


You're welcome Olof, but thanks is never necessary for me. I will always help the community even if I am being cursed out constantly. I have odd personality :thumbup:

Just for information, I keep a static FreeBSD binary (bzip2-compressed) here:
http://www.ltr-data.se/files/devio.bz2


Wow! Your static freebsd binary is less than half the size of my linux one! And that's with lzma upx compression too. I think maybe i'll just use yours instead :thumbup:

Well that's if most linux livecds have proper freebsd binary emulation anyhow. I will have to check.

EDIT:
Checked and well, it doesn't seem to work. :1st:
Apparently the FreeBSD ABI emulation still needs more work. I get a segmentation fault in imalloc somewhere. So I guess we'll just have to resort to having to use 2 different binaries.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users