* grub-core/osdep/linux/emunet.c: ..here.
+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 ...
module = {
name = emunet;
- emu = net/drivers/emu/emunet.c;
+ emu = osdep/emunet.c;
enable = emu;
};
--- /dev/null
+/*
+ * 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+");
--- /dev/null
+#if defined (__linux__)
+#include "linux/emunet.c"
+#else
+#include "basic/emunet.c"
+#endif
/*
* 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
#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 <linux/if.h>
+#include <linux/if_tun.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
GRUB_MOD_INIT(emunet)
{
-#ifdef __linux__
struct ifreq ifr;
fd = open ("/dev/net/tun", O_RDWR | O_NONBLOCK);
if (fd < 0)
return;
}
grub_net_card_register (&emucard);
-#else /* !__linux__ */
- fd = -1;
- return;
-#endif /* __linux__ */
}
GRUB_MOD_FINI(emunet)