Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> Devio minor problems, Mostly under linux
slothman
post Jun 30 2007, 12:45 AM
Post #1


Newbie
*

Group: Members
Posts: 5
Joined: 30-June 07
Member No.: 9,247


United States


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.
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Jun 30 2007, 07:30 PM
Post #2


Advanced Member
***

Group: Developer
Posts: 120
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (slothman @ Jun 30 2007, 02:45 AM) *
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.
QUOTE (slothman @ Jun 30 2007, 02:45 AM) *
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.
QUOTE (slothman @ Jun 30 2007, 02:45 AM) *
Btw your devio.exe works great! Used it already to clone an xp install. Real nice transfer speeds too.

Thank you! (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)
Go to the top of the page
 
+Quote Post
slothman
post Jun 30 2007, 08:18 PM
Post #3


Newbie
*

Group: Members
Posts: 5
Joined: 30-June 07
Member No.: 9,247


United States


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 (IMG:http://www.boot-land.net/forums/style_emoticons/default/thumbsup.gif)

Attached is a static linux binary for everyone to enjoy (well everyone who registered for the forum anyway)
Attached File  devio.zip ( 165.24K ) Number of downloads: 21


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.
Go to the top of the page
 
+Quote Post
Olof Lagerkvist
post Jul 1 2007, 03:58 PM
Post #4


Advanced Member
***

Group: Developer
Posts: 120
Joined: 27-April 07
From: Borås, Sweden
Member No.: 6,234


Sweden


QUOTE (slothman @ Jun 30 2007, 10:18 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! (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)

Just for information, I keep a static FreeBSD binary (bzip2-compressed) here:
http://www.ltr-data.se/files/devio.bz2
Go to the top of the page
 
+Quote Post
slothman
post Jul 2 2007, 08:36 PM
Post #5


Newbie
*

Group: Members
Posts: 5
Joined: 30-June 07
Member No.: 9,247


United States


QUOTE (Olof Lagerkvist @ Jul 1 2007, 10:58 AM) *
Okay, I will add these changes to the sources then. Thanks for testing and sharing your solution! (IMG:http://www.boot-land.net/forums/style_emoticons/default/smile.gif)


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 (IMG:http://www.boot-land.net/forums/style_emoticons/default/wacko.gif)

QUOTE (Olof Lagerkvist @ Jul 1 2007, 10:58 AM) *
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 (IMG:http://www.boot-land.net/forums/style_emoticons/default/wink.gif)

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. (IMG:http://www.boot-land.net/forums/style_emoticons/default/frusty.gif)
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.
Go to the top of the page
 
+Quote Post
« Next Oldest · ImDisk · Next Newest »
 

Fast ReplyReply to this topicStart new topic

Members Who Viewed Topic Today ()

 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

RSS Lo-Fi Version Time is now: 27th February 2008 - 05:06 PM

MKPortal ©2003-2006 mkportal.it