* grub-core/net/drivers/emu/emunet.c: Move to ..
* grub-core/osdep/linux/emunet.c: ..here.
This commit is contained in:
parent
9a2c903f28
commit
aabe433afe
5 changed files with 35 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-10-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/net/drivers/emu/emunet.c: Move to ..
|
||||
* grub-core/osdep/linux/emunet.c: ..here.
|
||||
|
||||
2013-10-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/ieee1275/ofpath.c: Move to ...
|
||||
|
|
|
@ -1973,7 +1973,7 @@ module = {
|
|||
|
||||
module = {
|
||||
name = emunet;
|
||||
emu = net/drivers/emu/emunet.c;
|
||||
emu = osdep/emunet.c;
|
||||
enable = emu;
|
||||
};
|
||||
|
||||
|
|
21
grub-core/osdep/basic/emunet.c
Normal file
21
grub-core/osdep/basic/emunet.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
5
grub-core/osdep/emunet.c
Normal file
5
grub-core/osdep/emunet.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
#if defined (__linux__)
|
||||
#include "linux/emunet.c"
|
||||
#else
|
||||
#include "basic/emunet.c"
|
||||
#endif
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010,2011 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2010,2011,2012,2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -21,10 +21,8 @@
|
|||
#include <sys/socket.h>
|
||||
#include <grub/net.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_tun.h>
|
||||
#endif /* __linux__ */
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
@ -99,7 +97,6 @@ static struct grub_net_card emucard =
|
|||
|
||||
GRUB_MOD_INIT(emunet)
|
||||
{
|
||||
#ifdef __linux__
|
||||
struct ifreq ifr;
|
||||
fd = open ("/dev/net/tun", O_RDWR | O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
|
@ -113,10 +110,6 @@ GRUB_MOD_INIT(emunet)
|
|||
return;
|
||||
}
|
||||
grub_net_card_register (&emucard);
|
||||
#else /* !__linux__ */
|
||||
fd = -1;
|
||||
return;
|
||||
#endif /* __linux__ */
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(emunet)
|
Loading…
Reference in a new issue