-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
30 additions
and
971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ c.img | |
cd.iso | ||
loader.tr | ||
cscope* | ||
a.out | ||
loader.po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1 @@ | ||
Afrikaans af latarcyrheb-sun16 af_ZA.UTF-8 us Africa/Johannesburg | ||
Arabic ar none ar_SA.UTF-8 us Asia/Riyadh | ||
Assamese as none as_IN.UTF-8 us Asia/Kolkata | ||
Bengali bn none bn_BD.UTF-8 us Asia/Dhaka | ||
Bengali(India) bn none bn_IN.UTF-8 us Asia/Kolkata | ||
Bulgarian bg latarcyrheb-sun16 bg_BG.UTF-8 bg_bds-utf8 Europe/Sofia | ||
Catalan ca latarcyrheb-sun16 ca_ES.UTF-8 es Europe/Madrid | ||
Chinese(Simplified) zh_CN none zh_CN.UTF-8 us Asia/Shanghai | ||
Chinese(Traditional) zh_TW none zh_TW.UTF-8 us Asia/Taipei | ||
Croatian hr latarcyrheb-sun16 hr_HR.UTF-8 croat Europe/Zagreb | ||
Czech cs latarcyrheb-sun16 cs_CZ.UTF-8 cz-lat2 Europe/Prague | ||
Danish da latarcyrheb-sun16 da_DK.UTF-8 dk Europe/Copenhagen | ||
Dutch nl latarcyrheb-sun16 nl_NL.UTF-8 nl Europe/Amsterdam | ||
English en latarcyrheb-sun16 en_US.UTF-8 us America/New_York | ||
Estonian et latarcyrheb-sun16 et_EE.UTF-8 et Europe/Tallinn | ||
Finnish fi latarcyrheb-sun16 fi_FI.UTF-8 fi Europe/Helsinki | ||
French fr latarcyrheb-sun16 fr_FR.UTF-8 fr-latin9 Europe/Paris | ||
German de latarcyrheb-sun16 de_DE.UTF-8 de-latin1-nodeadkeys Europe/Berlin | ||
Greek el iso07u-16 el_GR.UTF-8 gr Europe/Athens | ||
Gujarati gu none gu_IN.UTF-8 us Asia/Kolkata | ||
Hebrew he none he_IL.UTF-8 us Asia/Jerusalem | ||
Hindi hi none hi_IN.UTF-8 us Asia/Kolkata | ||
Hungarian hu latarcyrheb-sun16 hu_HU.UTF-8 hu Europe/Budapest | ||
Icelandic is latarcyrheb-sun16 is_IS.UTF-8 is-latin1 Atlantic/Reykjavik | ||
Iloko ilo latarcyrheb-sun16 ilo_PH.UTF-8 us Asia/Manila | ||
Indonesian id latarcyrheb-sun16 id_ID.UTF-8 us Asia/Jakarta | ||
Italian it latarcyrheb-sun16 it_IT.UTF-8 it Europe/Rome | ||
Japanese ja none ja_JP.UTF-8 jp106 Asia/Tokyo | ||
Kannada kn none kn_IN.UTF-8 us Asia/Kolkata | ||
Korean ko none ko_KR.UTF-8 us Asia/Seoul | ||
Macedonian mk latarcyrheb-sun16 mk_MK.UTF-8 mk Europe/Skopje | ||
Maithili mai none mai_IN.UTF-8 us Asia/Kolkata | ||
Malay ms latarcyrheb-sun16 ms_MY.UTF-8 us Asia/Kuala_Lumpur | ||
Malayalam ml none ml_IN.UTF-8 us Asia/Kolkata | ||
Marathi mr none mr_IN.UTF-8 us Asia/Kolkata | ||
Nepali ne none ne_NP.UTF-8 us Asia/Kathmandu | ||
Norwegian(Bokmål) nb latarcyrheb-sun16 nb_NO.UTF-8 no Europe/Oslo | ||
Northern Sotho nso latarcyrheb-sun16 nso_ZA.UTF-8 us Africa/Johannesburg | ||
Oriya or none or_IN.UTF-8 us Asia/Kolkata | ||
Persian fa none fa_IR.UTF-8 us Asia/Tehran | ||
Polish pl latarcyrheb-sun16 pl_PL.UTF-8 pl2 Europe/Warsaw | ||
Portuguese pt latarcyrheb-sun16 pt_PT.UTF-8 pt-latin1 Europe/Lisbon | ||
Portuguese(Brazilian) pt_BR latarcyrheb-sun16 pt_BR.UTF-8 br-abnt2 America/Sao_Paulo | ||
Punjabi pa none pa_IN.UTF-8 us Asia/Kolkata | ||
Romanian ro Lat2-Terminus16 ro_RO.UTF-8 ro Europe/Bucharest | ||
Russian ru none ru_RU.UTF-8 ru Europe/Moscow | ||
Serbian sr latarcyrheb-sun16 sr_RS.UTF-8 sr-cy Europe/Belgrade | ||
Serbian(Latin) sr@latin latarcyrheb-sun16 sr_RS.UTF-8@latin sr-latin Europe/Belgrade | ||
Sinhala si none si_LK.UTF-8 us Asia/Colombo | ||
Slovak sk latarcyrheb-sun16 sk_SK.UTF-8 sk-qwerty Europe/Bratislava | ||
Slovenian sl latarcyrheb-sun16 sl_SI.UTF-8 slovene Europe/Ljubljana | ||
Spanish es latarcyrheb-sun16 es_ES.UTF-8 es Europe/Madrid | ||
Swedish sv latarcyrheb-sun16 sv_SE.UTF-8 sv-latin1 Europe/Stockholm | ||
Tajik tg none tg_TG.UTF-8 tj Asia/Dushanbe | ||
Tamil ta none ta_IN.UTF-8 us Asia/Kolkata | ||
Telugu te none te_IN.UTF-8 us Asia/Kolkata | ||
Turkish tr latarcyrheb-sun16 tr_TR.UTF-8 trq Europe/Istanbul | ||
Ukrainian uk latarcyrheb-sun16 uk_UA.UTF-8 ua-utf Europe/Kiev | ||
Vietnamese vi latarcyrheb-sun16 vi_VN.UTF-8 us Asia/Saigon | ||
Welsh cy latarcyrheb-sun16 cy_GB.UTF-8 uk Europe/London | ||
Zulu zu latarcyrheb-sun16 zu_ZA.UTF-8 us Africa/Johannesburg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,11 @@ | |
* Author(s): David Cantrell <[email protected]> | ||
*/ | ||
|
||
/* | ||
* Reference: | ||
* https://www.infradead.org/~tgr/libnl/doc/core.html | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
|
@@ -50,23 +55,23 @@ | |
#include "str.h" | ||
|
||
/* Internal-only function prototypes. */ | ||
static struct nl_handle *_iface_get_handle(void); | ||
static struct nl_cache *_iface_get_link_cache(struct nl_handle **); | ||
static struct nl_sock *_iface_get_handle(void); | ||
static struct nl_cache *_iface_get_link_cache(struct nl_sock **); | ||
static int _iface_have_valid_addr(void *addr, int family, int length); | ||
static int _iface_redirect_io(char *device, int fd, int mode); | ||
|
||
/* | ||
* Return a libnl handle for NETLINK_ROUTE. | ||
*/ | ||
static struct nl_handle *_iface_get_handle(void) { | ||
struct nl_handle *handle = NULL; | ||
static struct nl_sock *_iface_get_handle(void) { | ||
struct nl_sock *handle = NULL; | ||
|
||
if ((handle = nl_handle_alloc()) == NULL) { | ||
if ((handle = nl_socket_alloc()) == NULL) { | ||
return NULL; | ||
} | ||
|
||
if (nl_connect(handle, NETLINK_ROUTE)) { | ||
nl_handle_destroy(handle); | ||
nl_socket_free(handle); | ||
return NULL; | ||
} | ||
|
||
|
@@ -77,16 +82,16 @@ static struct nl_handle *_iface_get_handle(void) { | |
* Return an NETLINK_ROUTE cache. | ||
* https://bugzilla.redhat.com/show_bug.cgi?id=886862 | ||
*/ | ||
static struct nl_cache *_iface_get_link_cache(struct nl_handle **handle) { | ||
struct nl_cache *cache = NULL; | ||
static struct nl_cache *_iface_get_link_cache(struct nl_sock **handle) { | ||
struct nl_cache **cache = NULL; | ||
|
||
if ((*handle = _iface_get_handle()) == NULL) { | ||
return NULL; | ||
} | ||
|
||
if ((cache = rtnl_link_alloc_cache(*handle)) == NULL) { | ||
if ((cache = rtnl_link_alloc_cache(*handle, AF_UNSPEC, cache)) == NULL) { | ||
nl_close(*handle); | ||
nl_handle_destroy(*handle); | ||
nl_socket_free(*handle); | ||
return NULL; | ||
} | ||
|
||
|
@@ -297,7 +302,7 @@ char *iface_ip2str(char *ifname, int family) { | |
char *iface_mac2str(char *ifname) { | ||
int buflen = 20; | ||
char *buf = NULL; | ||
struct nl_handle *handle = NULL; | ||
struct nl_sock *handle = NULL; | ||
struct nl_cache *cache = NULL; | ||
struct rtnl_link *link = NULL; | ||
struct nl_addr *addr = NULL; | ||
|
@@ -327,12 +332,12 @@ char *iface_mac2str(char *ifname) { | |
} | ||
|
||
mac2str_error4: | ||
nl_addr_destroy(addr); | ||
nl_addr_put(addr); | ||
mac2str_error3: | ||
rtnl_link_put(link); | ||
mac2str_error2: | ||
nl_close(handle); | ||
nl_handle_destroy(handle); | ||
nl_socket_free(handle); | ||
|
||
return buf; | ||
} | ||
|
@@ -573,7 +578,7 @@ int iface_start_NetworkManager(DBusConnection *connection, char **error) { | |
*/ | ||
int iface_set_interface_mtu(char *ifname, int mtu) { | ||
int ret = 0; | ||
struct nl_handle *handle = NULL; | ||
struct nl_sock *handle = NULL; | ||
struct nl_cache *cache = NULL; | ||
struct rtnl_link *link = NULL; | ||
struct rtnl_link *request = NULL; | ||
|
@@ -607,7 +612,7 @@ int iface_set_interface_mtu(char *ifname, int mtu) { | |
rtnl_link_put(link); | ||
ifacemtu_error1: | ||
nl_close(handle); | ||
nl_handle_destroy(handle); | ||
nl_socket_free(handle); | ||
|
||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.