On Wednesday, 24 January 2007 14:10, Tim Dijkstra wrote:
> Hi,
> 
> I was skimming trough the code some more when I found some more
> duplicated code. getconsolefd in vt.c and console_fd suspend.c. The
> differences are that console_fd opens like:
> 
>   fd = open(fname, O_RDONLY);
>        if (fd < 0 && errno == EACCES)
>                fd = open(fname, O_WRONLY);
> 
> and getconsolefd
> 
>     fd = open(fnam, O_RDWR);
>         if (fd < 0)
>                 return -1;
> 
> Also getconsolefd tries a bunch of device nodes, while console_fd only
> tries /dev/console.

This only matters if the nodes getconsolefd are present when resume is run
(eg. they have to be in the user's initrd image).

> Attached patch makes resume use getconsolefd.
> 
> What do you think?

Well, it has a potential of breaking someone's setup, but otherwise looks sane.

Rafael


-- 
If you don't have the time to read,
you don't have the time or the tools to write.
                - Stephen King

-------------------------------------------------------------------------
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

Reply via email to