On Sunday, 25 March 2007 01:14, Tim Dijkstra wrote: > On Sun, 25 Mar 2007 00:17:22 +0100 > "Cédric Boutillier" <[EMAIL PROTECTED]> wrote: > > > > Which kernel are you using? Could you try to catch the error code that > > > s2both returns? Or just add two printf's that print out the error code? > > > > I have modified the three lines you mentionned as follows: > > error = ioctl(dev, SNAPSHOT_SET_SWAP_AREA, &swap); > > printf("Error: errno = %d\n", errno); > > if (error && !offset) { > > error = ioctl(dev, SNAPSHOT_SET_SWAP_FILE, blkdev); > > printf("Error: errno = %d\n", errno); > > } > > > > After having rebuild and reinstalled the package, I get the followind > > messsage : > > $ sudo s2both > > Error: errno = 25 > > ENOTTY, That is to be expected from 2.6.18, there isn't support yet for > SNAPSHOT_SET_SWAP_AREA > > > Error: errno = 22 > > suspend: Could not use the resume device (try swapon -a) > > zsh: exit 22 sudo s2both > > OK, that is EINVAL. Reading the kernel source, it seems it can't > decode the value that represents the device we're sending to the kernel. > I don't understand ...
Well, there's a hack in the kernel that works on x86_*, but may not be portable (I didn't think of that). Namely, we use old_decode_dev() to obtain the device number from what the user space gives us and that need not work on powerpc, at least in principle. Greetings, Rafael ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel