From 7940f8c42a333993a9243881b025a6662a91f423 Mon Sep 17 00:00:00 2001 From: "Francisco Javier F. Serrador" Date: Fri, 2 Apr 2010 10:29:53 -0700 Subject: [PATCH 001/105] po: update Spanish translation (bgo #614187) --- po/es.po | 412 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 235 insertions(+), 177 deletions(-) diff --git a/po/es.po b/po/es.po index fe3f8297d2..0b0ed64691 100644 --- a/po/es.po +++ b/po/es.po @@ -1,11 +1,9 @@ -# translation of NetworkManager.HEAD.po to Español -# translation of NetworkManager.HEAD.po to -# Traducción de NetworkManager al español. +# translation of NetworkManager.HEAD.po to Spanish # Copyright (C) Spanish translation for NetworkManager # This file is distributed under the same license as the NetworkManager package. # # Antonio Ognio , 2004. -# Francisco Javier F. Serrador , 2004, 2005, 2006. +# Francisco Javier F. Serrador , 2004, 2005, 2006, 2010. # Lucas Vieites Fariña , 2005, 2006. # Jorge González , 2007, 2008, 2010. msgid "" @@ -14,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=NetworkManager&component=general\n" "POT-Creation-Date: 2010-02-26 03:24+0000\n" -"PO-Revision-Date: 2010-03-07 13:27+0100\n" +"PO-Revision-Date: 2010-03-28 18:46+0200\n" "Last-Translator: Jorge González \n" "Language-Team: Español \n" "MIME-Version: 1.0\n" @@ -35,6 +33,14 @@ msgid "" "]\n" " down id | uuid \n" msgstr "" +"Uso: nmcli con { COMANDO | help }\n" +" COMANDO := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--" +"nowait] [--timeout ]\n" +" down id | uuid \n" #: ../cli/src/connections.c:158 msgid "Connections" @@ -64,12 +70,12 @@ msgstr "Nombre" #: ../cli/src/connections.c:163 #, c-format msgid "System connections:\n" -msgstr "" +msgstr "Conexiones del sistema:\n" #: ../cli/src/connections.c:167 #, c-format msgid "User connections:\n" -msgstr "" +msgstr "Conexiones del usuario:\n" #: ../cli/src/connections.c:178 ../cli/src/connections.c:967 #: ../cli/src/connections.c:983 ../cli/src/connections.c:992 @@ -78,20 +84,20 @@ msgstr "" #: ../cli/src/devices.c:785 ../cli/src/devices.c:792 #, c-format msgid "Error: %s argument is missing." -msgstr "" +msgstr "Error: falta el argumento %s." #: ../cli/src/connections.c:189 #, c-format msgid "Error: %s - no such connection." -msgstr "" +msgstr "Error: %s; no existe tal conexión." #: ../cli/src/connections.c:196 msgid "System-wide connections" -msgstr "" +msgstr "Conexiones amplias del sistema" #: ../cli/src/connections.c:205 msgid "User connections" -msgstr "" +msgstr "Conexiones del usuario" #: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 #: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 @@ -99,12 +105,12 @@ msgstr "" #: ../cli/src/devices.c:798 #, c-format msgid "Unknown parameter: %s\n" -msgstr "" +msgstr "Parámetro desconocido: %s\n" #: ../cli/src/connections.c:221 #, c-format msgid "Error: no valid parameter specified." -msgstr "" +msgstr "Error: no se especificó un parámetro válido." #. FIXME: Fix the output #: ../cli/src/connections.c:268 ../cli/src/devices.c:302 @@ -119,7 +125,7 @@ msgstr "no" #: ../cli/src/connections.c:297 msgid "Active connections" -msgstr "Conexiones activas" +msgstr "Activar conexiones" #: ../cli/src/connections.c:297 ../cli/src/connections.c:299 #: ../cli/src/devices.c:302 ../cli/src/devices.c:304 @@ -137,12 +143,12 @@ msgstr "Dispositivos" #: ../cli/src/connections.c:659 #, c-format msgid "no active connection on device '%s'" -msgstr "" +msgstr "no existe una conexión activa en el dispositivo «%s»" #: ../cli/src/connections.c:667 #, c-format msgid "no active connection or device" -msgstr "" +msgstr "no existe una conexión o dispositivo activo" #: ../cli/src/connections.c:730 msgid "activating" @@ -160,31 +166,31 @@ msgstr "desconocido" #: ../cli/src/connections.c:744 msgid "VPN connecting (prepare)" -msgstr "" +msgstr "Conectando con la VPN (preparación)" #: ../cli/src/connections.c:746 msgid "VPN connecting (need authentication)" -msgstr "" +msgstr "Conectando con la VPN (necesita autorización)" #: ../cli/src/connections.c:748 msgid "VPN connecting" -msgstr "" +msgstr "Conectando con la VPN" #: ../cli/src/connections.c:750 msgid "VPN connecting (getting IP configuration)" -msgstr "" +msgstr "Conectando con la VPN (obteniendo configuración IP)" #: ../cli/src/connections.c:752 msgid "VPN connected" -msgstr "" +msgstr "VPN conectada" #: ../cli/src/connections.c:754 msgid "VPN connection failed" -msgstr "" +msgstr "Falló la conexión VPN" #: ../cli/src/connections.c:756 msgid "VPN disconnected" -msgstr "" +msgstr "VPN desconectada" #: ../cli/src/connections.c:767 msgid "unknown reason" @@ -196,43 +202,43 @@ msgstr "ninguna" #: ../cli/src/connections.c:771 msgid "the user was disconnected" -msgstr "" +msgstr "se desconectó al usuario" #: ../cli/src/connections.c:773 msgid "the base network connection was interrupted" -msgstr "" +msgstr "se interrumpió la conexión base de red" #: ../cli/src/connections.c:775 msgid "the VPN service stopped unexpectedly" -msgstr "" +msgstr "el servicio VPN finalizó inesperadamente" #: ../cli/src/connections.c:777 msgid "the VPN service returned invalid configuration" -msgstr "" +msgstr "el servicio VPN devolvió una configuración no válida" #: ../cli/src/connections.c:779 msgid "the connection attempt timed out" -msgstr "" +msgstr "expiró el intento de conexión" #: ../cli/src/connections.c:781 msgid "the VPN service did not start in time" -msgstr "" +msgstr "el servicio VPN no se inició a tiempo" #: ../cli/src/connections.c:783 msgid "the VPN service failed to start" -msgstr "" +msgstr "el servicio VPN falló al iniciar" #: ../cli/src/connections.c:785 msgid "no valid VPN secrets" -msgstr "" +msgstr "secretos VPN no válidos" #: ../cli/src/connections.c:787 msgid "invalid VPN secrets" -msgstr "" +msgstr "secretos VPN inválidos" #: ../cli/src/connections.c:789 msgid "the connection was removed" -msgstr "" +msgstr "se rechazó la conexión" #: ../cli/src/connections.c:803 #, c-format @@ -242,102 +248,104 @@ msgstr "estado: %s\n" #: ../cli/src/connections.c:806 ../cli/src/connections.c:832 #, c-format msgid "Connection activated\n" -msgstr "" +msgstr "Conexión activada\n" #: ../cli/src/connections.c:809 #, c-format msgid "Error: Connection activation failed." -msgstr "" +msgstr "Error: falló la activación de la conexión." #: ../cli/src/connections.c:828 #, c-format msgid "state: %s (%d)\n" -msgstr "" +msgstr "estado: %s (%d)\n" #: ../cli/src/connections.c:838 #, c-format msgid "Error: Connection activation failed: %s." -msgstr "" +msgstr "Error: falló la activación de la conexión: %s." #: ../cli/src/connections.c:855 ../cli/src/devices.c:551 #, c-format msgid "Error: Timeout %d sec expired." -msgstr "" +msgstr "Error: Expiró el tiempo de conexión de %d segs." #: ../cli/src/connections.c:898 #, c-format msgid "Error: Connection activation failed: %s" -msgstr "" +msgstr "Error: falló la activación de la conexión: %s" #: ../cli/src/connections.c:912 #, c-format msgid "Error: Obtaining active connection for '%s' failed." -msgstr "" +msgstr "Error: falló la obtención de una conexión activa para «%s»." #: ../cli/src/connections.c:921 #, c-format msgid "Active connection state: %s\n" -msgstr "" +msgstr "Estado de la conexión activa: %s\n" #: ../cli/src/connections.c:922 #, c-format msgid "Active connection path: %s\n" -msgstr "" +msgstr "Ruta de la conexión activa: %s\n" #: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 #, c-format msgid "Error: Unknown connection: %s." -msgstr "" +msgstr "Error: conexión desconocida: %s." #: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 #, c-format msgid "Error: timeout value '%s' is not valid." -msgstr "" +msgstr "Error: el valor «%s» no es válido para el tiempo de expiración." #: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 #, c-format msgid "Error: id or uuid has to be specified." -msgstr "" +msgstr "Error: se debe especificar el «id» o «uuid»." #: ../cli/src/connections.c:1044 #, c-format msgid "Error: No suitable device found: %s." -msgstr "" +msgstr "Error: no se encontró un dispositivo apropiado: %s." #: ../cli/src/connections.c:1046 #, c-format msgid "Error: No suitable device found." -msgstr "" +msgstr "Error: no se encontró un dispositivo apropiado." #: ../cli/src/connections.c:1138 #, c-format msgid "Warning: Connection not active\n" -msgstr "" +msgstr "Aviso: la conexión no está activa\n" #: ../cli/src/connections.c:1189 #, c-format msgid "Error: 'con' command '%s' is not valid." -msgstr "" +msgstr "Error: el comando «con» «%s» no es válido." #: ../cli/src/connections.c:1216 #, c-format msgid "Error: could not connect to D-Bus." -msgstr "" +msgstr "Error: no se pudo conectar con D-Bus." #: ../cli/src/connections.c:1223 #, c-format msgid "Error: Could not get system settings." -msgstr "" +msgstr "Error: no se pudo obtener la configuración del sistema." #: ../cli/src/connections.c:1231 #, c-format msgid "Error: Could not get user settings." -msgstr "" +msgstr "Error: no se pudo obtener la configuración del usuario." #: ../cli/src/connections.c:1241 #, c-format msgid "Error: Can't obtain connections: settings services are not running." msgstr "" +"Error: no se pueden obtener las conexiones: los servicios de configuración " +"no se están ejecutando." #: ../cli/src/devices.c:73 #, c-format @@ -352,106 +360,116 @@ msgid "" " wifi [list [iface ] | apinfo iface hwaddr ]\n" "\n" msgstr "" +"Uso: nmcli dev { COMANDO | help }\n" +"\n" +" COMANDO := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" #: ../cli/src/devices.c:93 msgid "unmanaged" -msgstr "" +msgstr "sin gestionar" #: ../cli/src/devices.c:95 msgid "unavailable" -msgstr "" +msgstr "no disponible" #: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 msgid "disconnected" -msgstr "" +msgstr "desconectado" #: ../cli/src/devices.c:99 msgid "connecting (prepare)" -msgstr "" +msgstr "conectando (preparación)" #: ../cli/src/devices.c:101 msgid "connecting (configuring)" -msgstr "" +msgstr "conectando (configuración)" #: ../cli/src/devices.c:103 msgid "connecting (need authentication)" -msgstr "" +msgstr "conectando (necesita autorización)" #: ../cli/src/devices.c:105 msgid "connecting (getting IP configuration)" -msgstr "" +msgstr "conectando (obteniendo configuración IP)" #: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 msgid "connected" -msgstr "" +msgstr "conectado" #: ../cli/src/devices.c:109 msgid "connection failed" -msgstr "" +msgstr "falló la conexión" #: ../cli/src/devices.c:132 ../cli/src/devices.c:876 msgid "Unknown" -msgstr "" +msgstr "Desconocido" #. print them #: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 #: ../cli/src/devices.c:879 msgid "(none)" -msgstr "" +msgstr "(nada)" #: ../cli/src/devices.c:209 #, c-format msgid "%s: error converting IP4 address 0x%X" -msgstr "" +msgstr "%s: error al convertir la dirección IP4 en 0x%X" #: ../cli/src/devices.c:238 #, c-format msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" -msgstr "" +msgstr "%s, %s, frecuencia %d MHz, tasa %d Mb/s, intensidad %d" #: ../cli/src/devices.c:239 msgid "Ad-Hoc" -msgstr "" +msgstr "Ad-Hoc" #: ../cli/src/devices.c:248 msgid ", Encrypted: " -msgstr "" +msgstr ", cifrado: " #: ../cli/src/devices.c:253 msgid " WEP" -msgstr "" +msgstr " WEP" #: ../cli/src/devices.c:255 msgid " WPA" -msgstr "" +msgstr " WPA" #: ../cli/src/devices.c:257 msgid " WPA2" -msgstr "" +msgstr " WPA2" #: ../cli/src/devices.c:260 msgid " Enterprise" -msgstr "" +msgstr " Enterprise" #: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 msgid "Device" -msgstr "" +msgstr "Dispositivo" #: ../cli/src/devices.c:299 msgid "Driver" -msgstr "" +msgstr "Controlador" #: ../cli/src/devices.c:299 ../cli/src/devices.c:567 msgid "(unknown)" -msgstr "" +msgstr "(desconocido)" #: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 msgid "State" -msgstr "" +msgstr "Estado" #: ../cli/src/devices.c:313 msgid "HW Address" -msgstr "" +msgstr "Dirección hardware" #: ../cli/src/devices.c:319 #, c-format @@ -459,19 +477,21 @@ msgid "" "\n" " Capabilities:\n" msgstr "" +"\n" +" Capacidades:\n" #: ../cli/src/devices.c:321 msgid "Carrier Detect" -msgstr "" +msgstr "Detector de portadora" #: ../cli/src/devices.c:336 #, c-format msgid "%u Mb/s" -msgstr "" +msgstr "%u Mb/s" #: ../cli/src/devices.c:337 msgid "Speed" -msgstr "" +msgstr "Velocidad" #: ../cli/src/devices.c:348 #, c-format @@ -479,26 +499,28 @@ msgid "" "\n" " Wireless Properties\n" msgstr "" +"\n" +" Propiedades de la conexión inalámbrica\n" #: ../cli/src/devices.c:353 msgid "WEP Encryption" -msgstr "" +msgstr "Cifrado WEP" #: ../cli/src/devices.c:355 msgid "WPA Encryption" -msgstr "" +msgstr "Cifrado WPA" #: ../cli/src/devices.c:357 msgid "WPA2 Encryption" -msgstr "" +msgstr "Cifrado WPA2" #: ../cli/src/devices.c:359 msgid "TKIP cipher" -msgstr "" +msgstr "Cifrado TKIP" #: ../cli/src/devices.c:361 msgid "CCMP cipher" -msgstr "" +msgstr "Cifrado CCMP" #: ../cli/src/devices.c:368 #, c-format @@ -506,10 +528,12 @@ msgid "" "\n" " Wireless Access Points %s\n" msgstr "" +"\n" +" Puntos de acceso inalámbricos %s\n" #: ../cli/src/devices.c:368 msgid "(* = current AP)" -msgstr "" +msgstr "(* = PA actual)" #: ../cli/src/devices.c:374 #, c-format @@ -517,18 +541,20 @@ msgid "" "\n" " Wired Properties\n" msgstr "" +"\n" +" Propiedades de la conexión cableada" #: ../cli/src/devices.c:377 ../cli/src/devices.c:379 msgid "Carrier" -msgstr "" +msgstr "Portadora" #: ../cli/src/devices.c:377 msgid "on" -msgstr "" +msgstr "encendido" #: ../cli/src/devices.c:379 msgid "off" -msgstr "" +msgstr "apagado" #: ../cli/src/devices.c:387 #, c-format @@ -536,151 +562,153 @@ msgid "" "\n" " IPv4 Settings:\n" msgstr "" +"\n" +" Ajustes de IPv4:\n" #: ../cli/src/devices.c:395 msgid "Address" -msgstr "" +msgstr "Dirección" #: ../cli/src/devices.c:401 msgid "Prefix" -msgstr "" +msgstr "Prefijo" #: ../cli/src/devices.c:405 msgid "Gateway" -msgstr "" +msgstr "Pasarela" #: ../cli/src/devices.c:416 msgid "DNS" -msgstr "" +msgstr "DNS" #: ../cli/src/devices.c:458 msgid "Status of devices" -msgstr "" +msgstr "Estado de los dispositivos" #: ../cli/src/devices.c:487 #, c-format msgid "Error: '%s' argument is missing." -msgstr "" +msgstr "Error: falta el argumento «%s»." #: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 #, c-format msgid "Error: Device '%s' not found." -msgstr "" +msgstr "Error: no se encontró el dispositivo «%s»" #: ../cli/src/devices.c:539 #, c-format msgid "Success: Device '%s' successfully disconnected." -msgstr "" +msgstr "Éxito: se desconectó correctamente el dispositivo «%s»." #: ../cli/src/devices.c:564 #, c-format msgid "Error: Device '%s' (%s) disconnecting failed: %s" -msgstr "" +msgstr "Error: falló la desconexión del dispositivo «%s» (%s): %s" #: ../cli/src/devices.c:572 #, c-format msgid "Device state: %d (%s)\n" -msgstr "" +msgstr "Estado del dispositivo: %d (%s)\n" #: ../cli/src/devices.c:636 #, c-format msgid "Error: iface has to be specified." -msgstr "" +msgstr "Error: se debe especificar la interfaz." #: ../cli/src/devices.c:736 ../cli/src/devices.c:746 msgid "WiFi scan list" -msgstr "" +msgstr "Lista de la inspección inalámbrica" #: ../cli/src/devices.c:740 #, c-format msgid "Error: Device '%s' is not a WiFi device." -msgstr "" +msgstr "Error: el dispositivo «%s» no es un dispositivo inalámbrico." #: ../cli/src/devices.c:754 msgid "Device:" -msgstr "" +msgstr "Dispositivo:" #: ../cli/src/devices.c:806 #, c-format msgid "Error: hwaddr has to be specified." -msgstr "" +msgstr "Error: se debe especificar la dirección hardware." #: ../cli/src/devices.c:844 #, c-format msgid "Error: Access point with hwaddr '%s' not found." -msgstr "" +msgstr "Error: no se encontró el punto de acceso con dirección hardware «%s»." #: ../cli/src/devices.c:862 #, c-format msgid "%u MHz" -msgstr "" +msgstr "%u MHz" #: ../cli/src/devices.c:863 #, c-format msgid "%u MB/s" -msgstr "" +msgstr "%u MB/s" #: ../cli/src/devices.c:869 ../cli/src/devices.c:871 msgid "AP parameters" -msgstr "" +msgstr "Parámetros del PA" #: ../cli/src/devices.c:873 msgid "SSID:" -msgstr "" +msgstr "SSID:" #: ../cli/src/devices.c:874 msgid "BSSID:" -msgstr "" +msgstr "BSSID:" #: ../cli/src/devices.c:875 msgid "Frequency:" -msgstr "" +msgstr "Frecuencia:" #: ../cli/src/devices.c:876 msgid "Mode:" -msgstr "" +msgstr "Modo:" #: ../cli/src/devices.c:876 msgid "Ad-hoc" -msgstr "" +msgstr "Ad-hoc" #: ../cli/src/devices.c:876 msgid "Infrastructure" -msgstr "" +msgstr "Infraestructura" #: ../cli/src/devices.c:877 msgid "Maximal bitrate:" -msgstr "" +msgstr "Tasa de bits máxima:" #: ../cli/src/devices.c:878 msgid "Strength:" -msgstr "" +msgstr "Intensidad:" #: ../cli/src/devices.c:879 msgid "Flags:" -msgstr "" +msgstr "Opciones:" #: ../cli/src/devices.c:879 msgid "privacy" -msgstr "" +msgstr "privacidad" #: ../cli/src/devices.c:880 msgid "WPA flags:" -msgstr "" +msgstr "Opciones WPA:" #: ../cli/src/devices.c:881 msgid "RSN flags:" -msgstr "" +msgstr "Opciones RSN:" #: ../cli/src/devices.c:907 #, c-format msgid "Error: 'dev wifi' command '%s' is not valid." -msgstr "" +msgstr "Error: el comando «dev wifi» «%s» no es válido." #: ../cli/src/devices.c:943 #, c-format msgid "Error: 'dev' command '%s' is not valid." -msgstr "" +msgstr "Error: el comando «dev» «%s» no es válido." #: ../cli/src/network-manager.c:46 #, c-format @@ -696,79 +724,89 @@ msgid "" " wwan [on|off]\n" "\n" msgstr "" +"Uso: nmcli nm {COMANDO | help }\n" +"\n" +" COMANDO := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" #: ../cli/src/network-manager.c:67 msgid "asleep" -msgstr "" +msgstr "dormida" #: ../cli/src/network-manager.c:69 msgid "connecting" -msgstr "" +msgstr "conectando" #: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 #: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 #: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 msgid "enabled" -msgstr "" +msgstr "activado" #: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 #: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 #: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 msgid "disabled" -msgstr "" +msgstr "desactivado" #: ../cli/src/network-manager.c:102 msgid "NetworkManager status" -msgstr "" +msgstr "Estado de NetworkManager" #: ../cli/src/network-manager.c:104 msgid "NM running:" -msgstr "" +msgstr "NM en ejecución:" #: ../cli/src/network-manager.c:104 msgid "running" -msgstr "" +msgstr "en ejecución" #: ../cli/src/network-manager.c:104 msgid "not running" -msgstr "" +msgstr "no está en ejecución" #: ../cli/src/network-manager.c:105 msgid "NM state:" -msgstr "" +msgstr "Estado de NM:" #: ../cli/src/network-manager.c:106 msgid "NM wireless hardware:" -msgstr "" +msgstr "Hardware inalámbrico de NM:" #. no argument, show current state #: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 msgid "NM wireless:" -msgstr "" +msgstr "Inalámbrico de NM:" #: ../cli/src/network-manager.c:108 msgid "NM WWAN hardware:" -msgstr "" +msgstr "Hardware WWAN de NM:" #. no argument, show current state #: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 msgid "NM WWAN:" -msgstr "" +msgstr "WWAN de NM:" #: ../cli/src/network-manager.c:150 #, c-format msgid "Error: invalid 'wifi' parameter: '%s'." -msgstr "" +msgstr "Error: parámetro «wifi» no válido: «%s»." #: ../cli/src/network-manager.c:167 #, c-format msgid "Error: invalid 'wwan' parameter: '%s'." -msgstr "" +msgstr "Error: parámetro «wwan» no válido: «%s»." #: ../cli/src/network-manager.c:178 #, c-format msgid "Error: 'nm' command '%s' is not valid." -msgstr "" +msgstr "Error: el comando «nm» «%s» no es válido." #: ../cli/src/nmcli.c:65 #, c-format @@ -787,35 +825,48 @@ msgid "" " dev devices managed by NetworkManager\n" "\n" msgstr "" +"Uso: %s [OPCIONES] OBJETO { COMANDO | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] salida breve\n" +" -p[retty] salida bonita\n" +" -v[ersion] mostrar la versión del programa\n" +" -h[elp] mostrar esta ayuda\n" +"\n" +"OBJECT\n" +" nm estado de NetworkManager\n" +" con conexiones de NetworkManager\n" +" dev dispositivos gestionados por NetworkManager\n" +"\n" #: ../cli/src/nmcli.c:106 #, c-format msgid "Object '%s' is unknown, try 'nmcli help'." -msgstr "" +msgstr "Se desconoce el objeto «%s», intente «nmcli help»." #: ../cli/src/nmcli.c:139 #, c-format msgid "nmcli tool, version %s\n" -msgstr "" +msgstr "herramienta nmcli, versión %s\n" #: ../cli/src/nmcli.c:145 #, c-format msgid "Option '%s' is unknown, try 'nmcli -help'." -msgstr "" +msgstr "Se desconoce la opción «%s», intente «nmcli -help»." #: ../cli/src/nmcli.c:164 #, c-format msgid "Caught signal %d, shutting down..." -msgstr "" +msgstr "Se capturó la señal %d, apagando..." #: ../cli/src/nmcli.c:189 #, c-format msgid "Error: Could not connect to NetworkManager." -msgstr "" +msgstr "Error: no se pudo conectar con NetworkManager." #: ../cli/src/nmcli.c:205 msgid "Success" -msgstr "" +msgstr "Éxito" #: ../libnm-util/crypto.c:120 #, c-format @@ -937,7 +988,7 @@ msgstr "Falló al inicializar el motor MD5: %s / %s." #: ../libnm-util/crypto_gnutls.c:156 #, c-format msgid "Invalid IV length (must be at least %zd)." -msgstr "" +msgstr "Longitud IV no válida (debe ser al menos %zd)." #: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 #, c-format @@ -966,7 +1017,6 @@ msgstr "Falló al descifrar la clave privada: %s / %s." #: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: unexpected padding length." msgstr "Falló al descifrar la clave privada: longitud inesperada del relleno." @@ -982,25 +1032,21 @@ msgstr "No se pudo reservar memoria para el cifrado." #: ../libnm-util/crypto_gnutls.c:294 #, c-format -#| msgid "Failed to initialize the decryption cipher context: %s / %s." msgid "Failed to initialize the encryption cipher context: %s / %s." msgstr "Falló al inicializar el contexto de cifrado: %s / %s." #: ../libnm-util/crypto_gnutls.c:303 #, c-format -#| msgid "Failed to set symmetric key for decryption: %s / %s." msgid "Failed to set symmetric key for encryption: %s / %s." msgstr "Falló al establecer la clave simétrica para el cifrado: %s / %s." #: ../libnm-util/crypto_gnutls.c:313 #, c-format -#| msgid "Failed to set IV for decryption: %s / %s." msgid "Failed to set IV for encryption: %s / %s." msgstr "Falló al establecer IV para el cifrado: %s / %s." #: ../libnm-util/crypto_gnutls.c:322 #, c-format -#| msgid "Failed to decrypt the private key: %s / %s." msgid "Failed to encrypt the data: %s / %s." msgstr "Falló al cifrar los datos: %s / %s." @@ -1042,7 +1088,7 @@ msgstr "Falló al inicializar el contexto MD5: %d" #: ../libnm-util/crypto_nss.c:179 #, c-format msgid "Invalid IV length (must be at least %d)." -msgstr "" +msgstr "Longitud de IV no válida (debe ser al menos %d)." #: ../libnm-util/crypto_nss.c:196 #, c-format @@ -1071,7 +1117,6 @@ msgstr "Falló al descifrar la clave privada: %d." #: ../libnm-util/crypto_nss.c:245 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: decrypted data too large." msgstr "" "Falló al descifrar la clave privada: los datos descifrados son demasiado " @@ -1084,38 +1129,33 @@ msgstr "Falló la finalización del descifrado de la clave privada: %d." #: ../libnm-util/crypto_nss.c:364 #, c-format -#| msgid "Failed to initialize the decryption cipher slot." msgid "Failed to initialize the encryption cipher slot." msgstr "Falló al inicializar la ranura de cifrado." #: ../libnm-util/crypto_nss.c:372 #, c-format -#| msgid "Failed to set symmetric key for decryption." msgid "Failed to set symmetric key for encryption." msgstr "Falló al establecer la clave simétrica para el cifrado." #: ../libnm-util/crypto_nss.c:380 #, c-format -#| msgid "Failed to set IV for decryption." msgid "Failed to set IV for encryption." msgstr "Falló al establecer IV para el cifrado." #: ../libnm-util/crypto_nss.c:388 #, c-format -#| msgid "Failed to initialize the decryption context." msgid "Failed to initialize the encryption context." msgstr "Falló al inicializar el contexto de cifrado." #: ../libnm-util/crypto_nss.c:396 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to encrypt: %d." msgstr "Falló al cifrar: %d." #: ../libnm-util/crypto_nss.c:404 #, c-format msgid "Unexpected amount of data after encrypting." -msgstr "" +msgstr "Cantidad de datos inesperada después de cifrar." #: ../libnm-util/crypto_nss.c:447 #, c-format @@ -1143,34 +1183,31 @@ msgid "Couldn't verify PKCS#12 file: %d" msgstr "No se pudo verificar el archivo PKCS#12: %d" #: ../libnm-util/crypto_nss.c:557 -#| msgid "Could not decode private key." msgid "Could not generate random data." msgstr "No se pudo generar datos aleatorios." -#: ../libnm-util/nm-utils.c:1545 +#: ../libnm-util/nm-utils.c:1802 #, c-format -#| msgid "Not enough memory to create private key decryption key." msgid "Not enough memory to make encryption key." msgstr "No hay memoria suficiente para crear la clave privada de cifrado." -#: ../libnm-util/nm-utils.c:1655 -#| msgid "Not enough memory to store PEM file data." +#: ../libnm-util/nm-utils.c:1912 msgid "Could not allocate memory for PEM file creation." msgstr "No se pudo reservar memoria para crear el archivo PEM." -#: ../libnm-util/nm-utils.c:1667 +#: ../libnm-util/nm-utils.c:1924 #, c-format msgid "Could not allocate memory for writing IV to PEM file." -msgstr "" +msgstr "No se pudo asignar memoria para escribir IV en el archivo PEM." -#: ../libnm-util/nm-utils.c:1679 +#: ../libnm-util/nm-utils.c:1936 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "" +"No se pudo asignar memoria para escribir la clave cifrada en el archivo PEM." -#: ../libnm-util/nm-utils.c:1698 +#: ../libnm-util/nm-utils.c:1955 #, c-format -#| msgid "Not enough memory to store PEM file data." msgid "Could not allocate memory for PEM file data." msgstr "No se pudo reservar memoria para el archivo de datos PEM." @@ -1217,17 +1254,17 @@ msgstr "ha ocurrido un error mientras esperaban datos en un socket" msgid "error updating link cache: %s" msgstr "error al actualizar el enlace caché: %s" -#: ../src/NetworkManager.c:494 +#: ../src/main.c:494 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Opción no válida. Use --help para ver una lista de las opciones válidas.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:300 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 msgid "# Created by NetworkManager\n" msgstr "# Creado por NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:316 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 #, c-format msgid "" "# Merged from %s\n" @@ -1236,21 +1273,35 @@ msgstr "" "# Mezclado de %s\n" "\n" +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "no se encontró ningún cliente de DHCP usable." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "no se pudo encontrar «dhclient»." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "no se pudo encontrar «dhcpd»." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "no se soporta el cliente de DHCP «%s»" + #: ../src/ip6-manager/nm-netlink-listener.c:200 #, c-format -#| msgid "unable to allocate netlink handle for monitoring link status: %s" msgid "unable to allocate netlink handle: %s" msgstr "no se puede asignar el manejador netlink: %s" #: ../src/ip6-manager/nm-netlink-listener.c:210 #, c-format -#| msgid "unable to connect to netlink for monitoring link status: %s" msgid "unable to connect to netlink: %s" msgstr "no se puede conectar con netlink: %s" #: ../src/ip6-manager/nm-netlink-listener.c:307 #, c-format -#| msgid "unable to join netlink group for monitoring link status: %s" msgid "unable to join netlink group: %s" msgstr "no pudo unirse al grupo netlink: %s" @@ -1275,32 +1326,39 @@ msgstr "Sistema" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 msgid "Connection sharing via a protected WiFi network" -msgstr "" +msgstr "Compartir la conexión a través de una red inalámbrica protegida" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 msgid "Connection sharing via an open WiFi network" -msgstr "" +msgstr "Compartir la conexión a través de una red inalámbrica abierta" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 msgid "Modify persistent system hostname" -msgstr "" +msgstr "Modificar el nombre de equipo persistente del sistema" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 msgid "Modify system connections" -msgstr "" +msgstr "Modificar las conexiones del sistema" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 msgid "System policy prevents modification of system settings" msgstr "" +"La política del sistema impide modificaciones de los ajustes del sistema" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 msgid "System policy prevents modification of the persistent system hostname" msgstr "" +"La política del sistema impide la modificaciones del nombre de equipo " +"persistente del sistema" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 msgid "System policy prevents sharing connections via a protected WiFi network" msgstr "" +"La política del sistema impide compartir conexiones a través de una red " +"inalámbrica protegida" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 msgid "System policy prevents sharing connections via an open WiFi network" msgstr "" +"La política del sistema impide compartir conexiones a través de una red " +"inalámbrica abierta" From 84f69ad65a1b0c26eb5ee5e0c0d7b19155b8ba19 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 2 Apr 2010 10:34:11 -0700 Subject: [PATCH 002/105] po: fix Spanish translation Missing \n on one item. --- po/es.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/es.po b/po/es.po index 0b0ed64691..9e0a29ca44 100644 --- a/po/es.po +++ b/po/es.po @@ -542,7 +542,7 @@ msgid "" " Wired Properties\n" msgstr "" "\n" -" Propiedades de la conexión cableada" +" Propiedades de la conexión cableada\n" #: ../cli/src/devices.c:377 ../cli/src/devices.c:379 msgid "Carrier" From d4c5930c0f46f66eee3da370009e6b8d6d77da08 Mon Sep 17 00:00:00 2001 From: Amanpreet Singh Alam Date: Sun, 4 Apr 2010 09:23:49 -0700 Subject: [PATCH 003/105] po: updated Punjabi translation (bgo #614718) --- po/pa.po | 1573 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 1415 insertions(+), 158 deletions(-) diff --git a/po/pa.po b/po/pa.po index 859ec9f758..052406ebb4 100644 --- a/po/pa.po +++ b/po/pa.po @@ -4,221 +4,1478 @@ # # Amanpreet Singh Alam , 2004. # Amanpreet Singh Alam , 2005. -# A S Alam , 2007. +# A S Alam , 2007, 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager.HEAD\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-02-03 18:35+0000\n" -"PO-Revision-Date: 2007-02-04 08:37+0530\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." +"cgi?product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-03-24 03:26+0000\n" +"PO-Revision-Date: 2010-04-03 14:08+0530\n" "Last-Translator: A S Alam \n" -"Language-Team: Punjabi \n" +"Language-Team: Punjabi/Panjabi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" +"X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:417 -msgid "Cannot add VPN connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ ਹੈ" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:419 -msgid "" -"No suitable VPN software was found on your system. Contact your system " -"administrator." -msgstr "" -"ਤੁਹਾਡੇ ਸਿਸਟਮ ਉੱਤੇ ਕੋਈ ਠੀਕ VPN ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਾ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ " -"ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:461 -msgid "Cannot import VPN connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਆਯਾਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" - -#: ../gnome/vpn-properties/nm-vpn-properties.c:463 +#: ../cli/src/connections.c:86 #, c-format msgid "" -"Cannot find suitable software for VPN connection type '%s' to import the " -"file '%s'. Contact your system administrator." +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ ਫਾਇਲ '%s' ਆਯਾਤ ਕਰਨ ਲਈ ਕੋਈ ਢੁੱਕਵਾਂ " -"ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਿਆ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" +"ਵਰਤੋਂ: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:580 +#: ../cli/src/connections.c:158 +#| msgid "VPN Connections" +msgid "Connections" +msgstr "ਕੁਨੈਕਸ਼ਨ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "ਕਿਸਮ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "ਨਾਂ" + +#: ../cli/src/connections.c:163 #, c-format -msgid "Error retrieving VPN connection '%s'" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ '%s' ਲੈਣ ਦੌਰਾਨ ਗਲਤੀ" +#| msgid "VPN Connections" +msgid "System connections:\n" +msgstr "ਸਿਸਟਮ ਕੁਨੈਕਸ਼ਨ:\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:583 +#: ../cli/src/connections.c:167 #, c-format -msgid "" -"Could not find the UI files for VPN connection type '%s'. Contact your " -"system administrator." -msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ UI ਫਾਇਲਾਂ ਨਹੀਂ ਲੱਭੀਆਂ ਹਨ। ਆਪਣੇ ਸਿਸਟਮ " -"ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" +#| msgid "VPN Connections" +msgid "User connections:\n" +msgstr "ਯੂਜ਼ਰ ਕੁਨੈਕਸ਼ਨ:\n" -#: ../gnome/vpn-properties/nm-vpn-properties.c:727 +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 #, c-format -msgid "Delete VPN connection \"%s\"?" -msgstr "ਕੀ VPN \"%s\" ਕੁਨੈਕਸ਼ਨ ਹਟਾਉਣਾ ਹੈ?" +msgid "Error: %s argument is missing." +msgstr "ਗਲਤੀ: %s ਆਰਗੂਮੈਂਟ ਮੌਜੂਦ ਨਹੀਂ ਹੈ।" -#: ../gnome/vpn-properties/nm-vpn-properties.c:730 +#: ../cli/src/connections.c:189 #, c-format -msgid "" -"All information about the VPN connection \"%s\" will be lost and you may " -"need your system administrator to provide information to create a new " -"connection." -msgstr "" -"VPN ਕੁਨੈਕਸ਼ਨ \"%s\" ਬਾਰੇ ਸਭ ਜਾਣਕਾਰੀ ਖਤਮ ਹੋ ਗਈ ਹੈ ਅਤੇ ਤੁਹਾਨੂੰ " -"ਨਵੇਂ ਕੁਨੈਕਸ਼ਨ ਬਣਾਉਣ ਲਈ ਜਾਣਕਾਰੀ ਵਾਸਤੇ ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ " -"ਨਾਲ ਸੰਪਰਕ ਕਰਨਾ ਪਵੇਗਾ।" +msgid "Error: %s - no such connection." +msgstr "ਗਲਤੀ: %s - ਇੰਝ ਦਾ ਕੋਈ ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.c:924 -msgid "Unable to load" -msgstr "ਲੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "ਸਿਸਟਮ-ਲਈ ਕੁਨੈਕਸ਼ਨ" -#: ../gnome/vpn-properties/nm-vpn-properties.c:926 -msgid "Cannot find some needed resources (the glade file)!" -msgstr "ਕੁਝ ਲੋੜੀਦੇ ਸਰੋਤ ਨਹੀਂ ਮਿਲੇ (ਗਲੇਡ ਫਾਇਲ)!" +#: ../cli/src/connections.c:205 +#| msgid "VPN Connections" +msgid "User connections" +msgstr "ਯੂਜ਼ਰ ਕੁਨੈਕਸ਼ਨ" -#. druid_window = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Create VPN Connection"), -#. NULL, -#. GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -#. GTK_STOCK_CANCEL, -#. GTK_RESPONSE_REJECT, -#. GTK_STOCK_APPLY, -#. GTK_RESPONSE_ACCEPT, -#. NULL)); -#: ../gnome/vpn-properties/nm-vpn-properties.c:1081 -msgid "Create VPN Connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਬਣਾਓ" +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "ਅਣਜਾਣ ਪੈਰਾਮੀਟਰ: %s\n" -#. gtk_container_add (GTK_CONTAINER (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label"))); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(druid), TRUE,TRUE,0); -#. gtk_box_pack_start (GTK_BOX (druid_window->vbox), GTK_WIDGET(gtk_label_new("Some label")), TRUE,TRUE,0); -#. toplevel = gtk_widget_get_toplevel (GTK_WIDGET (druid)); -#. gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event", GTK_SIGNAL_FUNC (vpn_window_close), NULL); -#. make the druid window modal wrt. our main window -#. gtk_window_set_modal (druid_window, TRUE); -#. gtk_window_set_transient_for (GTK_WINDOW(druid_window), GTK_WINDOW (dialog)); -#. Edit dialog -#: ../gnome/vpn-properties/nm-vpn-properties.c:1099 -msgid "Edit VPN Connection" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਸੋਧ" +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਪੈਰਾਮੀਟਰ ਨਹੀਂ ਦਿੱਤਾ।" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1 -msgid "Add a new VPN connection" -msgstr "ਇੱਕ ਨਵਾਂ VPN ਕੁਨੈਕਸ਼ਨ ਸ਼ਾਮਿਲ" +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "ਹਾਂ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2 -msgid "Delete the selected VPN connection" -msgstr "ਚੁਣਿਆ VPN ਕੁਨੈਕਸ਼ਨ ਹਟਾਓ" +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +#| msgid "none" +msgid "no" +msgstr "ਨਹੀਂ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3 -msgid "E_xport" -msgstr "ਨਿਰਯਾਤ(_x)" +#: ../cli/src/connections.c:297 +#| msgid "VPN Connections" +msgid "Active connections" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4 -msgid "Edit the selected VPN connection" -msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ 'ਚ ਸੋਧ" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "ਡਿਫਾਲਟ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5 -msgid "Export the VPN settings to a file" -msgstr "VPN ਸੈਟਿੰਗ ਨੂੰ ਫਾਇਲ 'ਚ ਭੇਜੋ" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "ਸਰਵਿਸ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6 -msgid "Export the selected VPN connection to a file" -msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ ਫਾਇਲ 'ਚ ਭੇਜੋ" +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "ਜੰਤਰ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7 -msgid "Manage Virtual Private Network Connections" -msgstr "ਵੁਰਚੁਅਲ ਪ੍ਰਾਈਵੇਟ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ ਪਰਬੰਧ" +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "ਜੰਤਰ '%s' ਉੱਤੇ ਕੋਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਹੈ" -#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8 -msgid "VPN Connections" -msgstr "VPN ਕੁਨੈਕਸ਼ਨ" +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "ਕੋਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਜਾਂ ਜੰਤਰ ਨਹੀਂ ਹੈ" -#: ../src/nm-ap-security-wep.c:52 -msgid "40-bit WEP" -msgstr "40-ਬਿੱਟ WEP" +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "ਚਾਲੂ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" -#: ../src/nm-ap-security-wep.c:54 -msgid "104-bit WEP" -msgstr "104-ਬਿੱਟ WEP" +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "ਚਾਲੂ ਕੀਤਾ" -#: ../src/nm-ap-security-wpa-psk.c:51 -msgid "WPA TKIP" -msgstr "WPA TKIP" +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "ਅਣਜਾਣ" -#: ../src/nm-ap-security-wpa-psk.c:53 -msgid "WPA CCMP" -msgstr "WPA CCMP" +#: ../cli/src/connections.c:744 +#| msgid "VPN Connections" +msgid "VPN connecting (prepare)" +msgstr "VPN ਕੁਨੈਕਸ਼ਨ (ਤਿਆਰੀ)" -#: ../src/nm-ap-security-wpa-psk.c:55 -msgid "WPA Automatic" -msgstr "WPA ਆਟੋਮੈਟਿਕ" +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਪਰਮਾਣਕਿਤਾ ਦੀ ਲੋੜ ਹੈ)" -#: ../src/nm-ap-security-wpa-psk.c:60 -msgid "WPA2 TKIP" -msgstr "WPA2 TKIP" +#: ../cli/src/connections.c:748 +#| msgid "VPN Connections" +msgid "VPN connecting" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" -#: ../src/nm-ap-security-wpa-psk.c:62 -msgid "WPA2 CCMP" -msgstr "WPA2 CCMP" +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (IP ਸੰਰਚਨਾ ਲਈ ਜਾ ਰਹੀ ਹੈ)" -#: ../src/nm-ap-security-wpa-psk.c:64 -msgid "WPA2 Automatic" -msgstr "WPA2 ਆਟੋਮੈਟਿਕ" +#: ../cli/src/connections.c:752 +#| msgid "VPN Connections" +msgid "VPN connected" +msgstr "VPN ਕੁਨੈਕਟ ਹੈ" -#: ../src/nm-ap-security.c:334 +#: ../cli/src/connections.c:754 +#| msgid "VPN Connections" +msgid "VPN connection failed" +msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ ਹੋਇਆ" + +#: ../cli/src/connections.c:756 +#| msgid "VPN Connections" +msgid "VPN disconnected" +msgstr "VPN ਡਿਸ-ਕੁਨੈਕਟ" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "ਅਣਜਾਣ ਕਾਰਨ" + +#: ../cli/src/connections.c:769 msgid "none" msgstr "ਕੋਈ ਨਹੀਂ" -#: ../src/nm-netlink-monitor.c:174 +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "ਯੂਜ਼ਰ ਡਿਸ-ਕੁਨੈਕਟ ਹੋ ਗਿਆ" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "ਬੇਸ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ 'ਚ ਰੁਕਾਵਟ" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN ਸਰਵਿਸ ਅਚਾਨਕ ਰੁਕ ਗਈ" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN ਸਰਵਿਸ ਨੇ ਅਢੁੱਕਵੀਂ ਸੰਰਚਨਾ ਵਾਪਸ ਕੀਤੀ" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "ਕੁਨੈਕਸ਼ਨ ਕੋਸ਼ਿਸ਼ ਦੌਰਾਨ ਸਮਾਂ ਸਮਾਪਤ ਹੋ ਗਿਆ" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN ਸਰਵਿਸ ਸਮੇਂ 'ਚ ਸ਼ੁਰੂ ਨਹੀਂ ਹੋਈ" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN ਸਰਵਿਸ ਸ਼ੁਰੂ ਹੋਣ ਲਈ ਫੇਲ੍ਹ ਹੋਈ" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "ਕੋਈ ਢੁੱਕਵਾਂ VPN ਭੇਦ ਨਹੀਂ" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "ਅਢੁੱਕਵਾਂ VPN ਭੇਦ" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "ਕੁਨੈਕਸ਼ਨ ਹਟਾਇਆ ਗਿਆ" + +#: ../cli/src/connections.c:803 #, c-format -msgid "unable to create netlink socket for monitoring wired ethernet devices - %s" -msgstr "" -"ਤਾਰ ਵਾਲੇ ਇਥਰਨੈੱਟ ਜੰਤਰ - %s ਦੀ ਨਿਗਰਾਨੀ ਲਈ netlink ਸਾਕਟ ਬਣਾਉਣ " -"ਲਈ ਅਸਫ਼ਲ" +msgid "state: %s\n" +msgstr "ਹਾਲਤ: %s\n" -#: ../src/nm-netlink-monitor.c:192 +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 #, c-format -msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s" +msgid "Connection activated\n" +msgstr "ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕੀਤਾ\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ਗਲਤ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "ਹਾਲਤ: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s।" + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ਗਲਤੀ: ਸਮਾਂ-ਸਮਾਪਤੀ %d ਸਕਿੰਟ ਖਤਮ ਹੋਏ।" + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s" + +#: ../cli/src/connections.c:912 +#, c-format +#| msgid "Error retrieving VPN connection '%s'" +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ਗਲਤੀ: '%s' ਲਈ ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਲੈਣ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਹਾਲਤ: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "ਚਾਲੂ ਕੁਨੈਕਸ਼ਨ ਪਾਥ: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +#| msgid "Error retrieving VPN connection '%s'" +msgid "Error: Unknown connection: %s." +msgstr "ਗਲਤੀ: ਅਣਜਾਣ ਕੁਨੈਕਸ਼ਨ: %s।" + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ਗਲਤੀ: ਸਮਾਂ-ਸਮਾਪਤੀ ਮੁੱਲ '%s' ਢੁੱਕਵਾਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ਗਲਤੀ: id ਜਾਂ uuid ਨਹੀਂ ਦਿੱਤਾ।" + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਜੰਤਰ ਨਹੀਂ ਲੱਭਿਆ: %s।" + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "ਗਲਤੀ: ਕੋਈ ਢੁੱਕਵਾਂ ਜੰਤਰ ਨਹੀਂ ਮਿਲਿਆ।" + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ਚੇਤਾਵਨੀ: ਕੁਨੈਕਸ਼ਨ ਚਾਲੂ ਨਹੀਂ ਹੈ\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'con' ਕਮਾਂਡ '%s' ਢੁੱਕਵਾਂ ਨਹੀਂ।" + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ਗਲਤੀ: ਡੀ-ਬੱਸ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ਗਲਤੀ: ਸਿਸਟਮ ਸੈਟਿੰਗ ਨਹੀਂ ਲਈ ਜਾ ਸਕੀ।" + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ਗਲਤੀ: ਯੂਜ਼ਰ ਸੈਟਿੰਗ ਨਹੀਂ ਲਈ ਜਾ ਸਕੀ।" + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ਗਲਤੀ: ਕੁਨੈਕਸ਼ਨ ਨਹੀਂ ਲਿਆ ਜਾ ਸਕਦਾ: ਸਿਸਟਮ ਸਰਵਿਸ ਨਹੀਂ ਚੱਲ ਰਹੀ ਹੈ।" + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" msgstr "" -"ਤਾਰ ਵਾਲੇ ਇਥਰਨੈੱਟ ਜੰਤਰ - %s ਦੀ ਨਿਗਰਾਨੀ ਲਈ netlink ਸਾਕਟ ਜੋੜਨ " -"ਲਈ ਅਸਫ਼ਲ" +"ਵਰਤੋਂ: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" -#: ../src/nm-netlink-monitor.c:427 -msgid "operation took too long" -msgstr "ਓਪਰੇਸ਼ਨ ਨੂੰ ਬਹੁਤ ਸਮਾਂ ਲੱਗ ਗਿਆ" +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "ਬਿਨ-ਪਰਬੰਧ" -#: ../src/nm-netlink-monitor.c:524 -msgid "received data from wrong type of sender" -msgstr "ਭੇਜਣ ਵਾਲੇ ਦੀ ਗਲਤ ਕਿਸਮ ਤੋਂ ਡਾਟਾ ਮਿਲਿਆ" +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "ਅਣ-ਉਪਲੱਬਧ" -#: ../src/nm-netlink-monitor.c:537 -msgid "received data from unexpected sender" -msgstr "ਅਣਜਾਣ ਭੇਜਣ ਵਾਲੇ ਵਲੋਂ ਡਾਟਾ ਮਿਲਿਆ" +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "ਡਿਸ-ਕੁਨੈਕਟ ਕੀਤਾ" -#: ../src/nm-netlink-monitor.c:666 -msgid "too much data was sent over socket and some of it was lost" -msgstr "ਸਾਕਟ ਉੱਤੇ ਬਹੁਤ ਵੱਧ ਡਾਟਾ ਭੇਜਿਆ ਗਿਆ ਅਤੇ ਇਸ 'ਚੋਂ ਕੁਝ ਗੁੰਮ ਹੋ ਗਿਆ" +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਤਿਆਰੀ)" -#: ../src/nm-netlink-monitor.c:774 +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਸੰਰਚਨਾ ਜਾਰੀ)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (ਪਰਮਾਣਕਿਤਾ ਦੀ ਲੋੜ)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ (IP ਸੰਰਚਨਾ ਲਈ ਜਾ ਰਹੀ ਹੈ)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "ਕੁਨੈਕਟ ਹੋਇਆ" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ ਹੈ" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "ਅਣਜਾਣ" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +#| msgid "none" +msgid "(none)" +msgstr "(ਕੋਈ ਨਹੀਂ)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ਐਡਰੈੱਸ 0x%X ਬਦਲਣ ਦੌਰਾਨ ਗਲਤੀ" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, ਫਰੀਕਿਊਂਸੀ %d MHz, ਦਰ %d Mb/s, ਤਾਕਤ %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "ਐਡ-ਹਾਕ" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", ਇੰਕ੍ਰਿਪਟ ਕੀਤਾ: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +#| msgid "WPA Enterprise" +msgid " Enterprise" +msgstr " ਇੰਟਰਪਰਾਈਸ" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "ਜੰਤਰ" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "ਡਰਾਇਵਰ" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(ਅਣਜਾਣ)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "ਹਾਲਤ" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW ਐਡਰੈੱਸ" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" ਸਮਰੱਥਾ:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "ਕੈਰੀਅਰ ਖੋਜ" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "ਸਪੀਡ" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" ਬੇਤਾਰ ਵਿਸ਼ੇਸ਼ਤਾ\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#: ../cli/src/devices.c:355 +#| msgid "WPA Enterprise" +msgid "WPA Encryption" +msgstr "WPA ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#: ../cli/src/devices.c:357 +#| msgid "WPA2 Enterprise" +msgid "WPA2 Encryption" +msgstr "WPA2 ਇੰਕ੍ਰਿਪਸ਼ਨ" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP ਸਿਫਰ" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP ਸੀਫਰ" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" ਬੇਤਾਰ ਅਸੈੱਸ ਪੁਆਇੰਟ %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = ਮੌਜੂਦਾ AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" ਤਾਰ ਨਾਲ ਵਿਸ਼ੇਸ਼ਤਾ\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "ਕੈਰੀਅਰ" + +#: ../cli/src/devices.c:377 +#| msgid "none" +msgid "on" +msgstr "ਚਾਲੂ" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "ਬੰਦ" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 ਵਿਸ਼ੇਸ਼ਤਾ:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "ਐਡਰੈੱਸ" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "ਪ੍ਰੀ-ਫਿਕਸ" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "ਗੇਟਵੇ" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "ਜੰਤਰਾਂ ਦੀ ਹਾਲਤ" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ਗਲਤੀ: '%s' ਆਰਗੂਮੈਂਟ ਗੁੰਮ ਹੈ।" + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "ਸਫ਼ਲ: ਜੰਤਰ '%s' ਠੀਕ ਤਰ੍ਹਾਂ ਡਿਸ-ਕੁਨੈਕਟ ਹੋ ਗਿਆ।" + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' (%s) ਡਿਸ-ਕੁਨੈਕਸ਼ਨ ਫੇਲ੍ਹ: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ਜੰਤਰ ਹਾਲਤ: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ਗਲਤੀ: iface ਦੇਣ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "ਵਾਈਫਾਈ ਸਕੈਨ ਲਿਸਟ" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ਗਲਤੀ: ਜੰਤਰ '%s' ਵਾਈ-ਫਾਈ ਜੰਤਰ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "ਜੰਤਰ:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "ਗਲਤੀ: hwaddr ਦੇਣ ਦੀ ਲੋੜ ਹੈ।" + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ਗਲਤੀ: hwaddr '%s' ਵਾਲਾ ਅਸੈੱਸ ਪੁਆਇੰਟ ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP ਪੈਰਾਮੀਟਰ" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "ਫਰੀਕਿਊਨਸੀ:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "ਮੋਡ:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "ਐਡ-ਹਾਕ" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "ਇੰਫਰਾਸਟੱਕਚਰ" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "ਵੱਧੋ-ਵੱਧ ਬਿੱਟਰੇਟ:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "ਤਾਕਤ:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "ਫਲੈਗ:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "ਪਰਾਈਵੇਸੀ" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA ਫਲੈਗ:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN ਫਲੈਗ:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'dev wifi' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'dev' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ਵਰਤੋਂ: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "asleep" + +#: ../cli/src/network-manager.c:69 +#| msgid "VPN Connections" +msgid "connecting" +msgstr "ਕੁਨੈਕਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "ਚਾਲੂ ਹੈ" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "ਬੰਦ ਹੈ" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "ਨੈੱਟਵਰਕਮੈਨੇਜਰ ਹਾਲਤ" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM ਚੱਲ ਰਿਹਾ ਹੈ:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "ਚੱਲ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "ਨਹੀਂ ਚੱਲ ਰਿਹਾ ਹੈ" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM ਹਾਲਤ:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM ਬੇਤਾਰ ਹਾਰਡਵੇਅਰ:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM ਬੇਤਾਰ:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN ਹਾਰਡਵੇਅਰ:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ਗਲਤੀ: ਅਢੁੱਕਵਾਂ 'wifi' ਪੈਰਾਮੀਟਰ: '%s'." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ਗਲਤੀ: ਅਢੁੱਕਵਾਂ 'wwan' ਪੈਰਾਮੀਟਰ: '%s'." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ਗਲਤੀ: 'nm' ਕਮਾਂਡ '%s' ਢੁੱਕਵੀਂ ਨਹੀਂ ਹੈ।" + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"ਵਰਤੋਂ: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "ਆਬਜੈਕਟ '%s' ਅਣਜਾਣ ਹੈ, 'nmcli help' ਵਰਤ ਕੇ ਵੇਖੋ।" + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ਟੂਲ, ਵਰਜਨ %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "ਚੋਣ '%s' ਅਣਜਾਣੀ ਹੈ 'nmcli -help' ਵਰਤ ਕੇ ਵੇਖੋ।" + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d ਸਿਗਨਲ ਮਿਲਿਆ, ਬੰਦ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ਗਲਤੀ: ਨੈੱਟਵਰਕਮੈਨੇਜਰ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "ਸਫ਼ਲ" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "PEM ਕੁੰਜੀ ਫਾਇਲ ਵਿੱਚ ਕੋਈ ਅੰਤ ਟੈਗ '%s' ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "PEM ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਫਾਇਲ ਵਾਂਗ ਨਹੀਂ ਜਾਪਦੀ।" + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "PEM ਫਾਇਲ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: Proc-Type ਪਹਿਲਾਂ ਟੈਗ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: ਅਣਜਾਣ Proc-Type ਟੈਗ '%s' ਹੈ।" + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਦੂਜਾ ਟੈਗ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਟੈਗ ਵਿੱਚ ਕੋਈ IV ਨਹੀਂ ਲੱਭਿਆ।" + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr " ਨਿਕਾਰਾ PEM ਫਾਇਲ: DEK-Info ਟੈਗ ਵਿੱਚ ਗਲਤ ਫਾਰਮੈਟ IV" + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "ਨਿਕਾਰਾ PEM ਫਾਇਲ: ਅਣਜਾਣ ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸੀਫਰ '%s'।" + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "PEM ਸਰਟੀਫਿਕੇਟ '%s' ਵਿੱਚ ਕੋਈ ਅੰਤ ਟੈਗ '%s' ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "ਸਰਟੀਫਿਕੇਟ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:294 +#, c-format +msgid "Not enough memory to store file data." +msgstr "ਫਾਇਲ ਡਾਟਾ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV ਲਈ ਲੰਬਾਈ ਜਿਸਤ ਅੰਕ ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ।" + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "IV ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV ਵਿੱਚ ਗ਼ੈਰ-ਹੈਕਸਾਡੈਸੀਮਲ ਅੰਕ ਹਨ।" + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸੀਫ਼ਰ '%s' ਅਣਜਾਣ ਹੈ।" + +#: ../libnm-util/crypto.c:391 +#, c-format +msgid "Not enough memory to decrypt private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡੀਕੋਡ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto.c:511 +#, c-format +msgid "Unable to determine private key type." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਕਿਸਮ ਜਾਣਨ ਲਈ ਅਸਮਰੱਥ ਹੈ।" + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "ਡਿਕ੍ਰਿਪਟ ਕੀਤੀ ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਸਟੋਰ ਕਰਨ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "ਕ੍ਰਿਪਟੂ ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "MD5 ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "ਅਢੁੱਕਵੀਂ IV ਲੰਬਾਈ (ਘੱਟੋ-ਘੱਟ %zd ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ)।" + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "ਡੀਕ੍ਰਿਪਟ ਕੀਤੇ ਕੁੰਜੀ ਬਫ਼ਰ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਸੀਫਰ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "%s / %s : ਡਿਕ੍ਰਿਪਟ ਲਈ IV ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: ਅਣਜਾਣ ਪੈਡਿੰਗ ਲੰਬਾਈ।" + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +msgid "Failed to decrypt the private key." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਸੀਫ਼ਰ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +msgid "Failed to set IV for encryption: %s / %s." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ IV ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +msgid "Failed to encrypt the data: %s / %s." +msgstr "ਡਾਟਾ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %s / %s" + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡਾਟਾ ਸ਼ੁਰੂ 'ਚ ਗਲਤੀ: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "PKCS#12 ਡੀਕੋਡਰ ਸ਼ੁਰੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "PKCS#12 ਫਾਇਲ ਡੀਕੋਡ ਨਹੀਂ ਜਾ ਸਕੀ: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "ਕ੍ਰਿਪਟੂ ਇੰਜਣ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "MD5 ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "ਅਢੁੱਕਵੀਂ IV ਲੰਬਾਈ (ਘੱਟੋ-ਘੱਟ %d ਹੋਣੀ ਲਾਜ਼ਮੀ ਹੈ)।" + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਸੀਫਰ ਸਲਾਟ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "ਡਿਕ੍ਰਿਪਟ ਲਈ IV ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "ਡਿਕ੍ਰਿਪਸ਼ਨ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: " + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d" + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਡਿਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: ਡਿਕ੍ਰਿਪਟ ਡਾਟਾ ਬਹੁਤ ਵੱਡਾ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "ਪ੍ਰਾਈਵੇਟ ਕੁੰਜ ਲਈ ਡੀਕ੍ਰਿਪਸ਼ਨ ਮੁਕੰਮਲ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ: %d।" + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +msgid "Failed to initialize the encryption cipher slot." +msgstr "ਕ੍ਰਿਪਸ਼ਨ ਸੀਫ਼ਰ ਸਲਾਟ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +msgid "Failed to set symmetric key for encryption." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ ਸਮਮਿਤੀ ਕੁੰਜੀ ਸੈੱਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ।" + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +msgid "Failed to set IV for encryption." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਲਈ IV ਸੈੱਟ ਕਰਨ ਵਾਸਤੇ ਫੇਲ੍ਹ।" + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +msgid "Failed to initialize the encryption context." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਪਰਸੰਗ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +msgid "Failed to encrypt: %d." +msgstr "ਇੰਕ੍ਰਿਪਟ ਕਰਨ ਲਈ ਫੇਲ੍ਹ: %d." + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "ਇੰਕ੍ਰਿਪਟ ਕਰਨ ਦੇ ਬਾਅਦ ਅਚਾਨਕ ਅਣਜਾਣ ਮਾਤਰਾ 'ਚ ਡਾਟਾ।" + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "ਸਰਟੀਫਿਕੇਟ ਡੀਕੋਡ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "ਪਾਸਵਰਡ ਨੂੰ UCS2 'ਚ ਬਦਲਿਆ ਨਹੀਂ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "PKCS#12 ਡੀਕੋਡਰ ਸ਼ੁਰੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "PKCS#12 ਫਾਇਲ ਜਾਂਚੀ ਨਹੀਂ ਜਾ ਸਕੀ: %d" + +#: ../libnm-util/crypto_nss.c:557 +msgid "Could not generate random data." +msgstr "ਰਲਵਾਂ ਡਾਟਾ ਤਿਆਰ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਿਆ।" + +#: ../libnm-util/nm-utils.c:1802 +#, c-format +msgid "Not enough memory to make encryption key." +msgstr "ਇੰਕ੍ਰਿਪਸ਼ਨ ਕੁੰਜੀ ਬਣਾਉਣ ਲਈ ਲੋੜੀਦੀ ਮੈਮੋਰੀ ਨਹੀਂ ਹੈ।" + +#: ../libnm-util/nm-utils.c:1912 +msgid "Could not allocate memory for PEM file creation." +msgstr "PEM ਫਾਇਲ ਬਣਾਉਣ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:1924 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "PEM ਫਾਇਲ ਵਾਸਤੇ IV ਲਿਖਣ ਲਈ ਮੈਮੋਰੀ ਦਿੱਤੀ ਨਹੀਂ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:1936 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "PEM ਫਾਇਲ ਵਾਸਤੇ ਇੰਕ੍ਰਿਪਟ ਕੀਤੀ ਕੁੰਜੀ ਲਿਖਣ ਲਈ ਮੈਮੋਰੀ ਦਿੱਤੀ ਨਹੀਂ ਜਾ ਸਕੀ।" + +#: ../libnm-util/nm-utils.c:1955 +#, c-format +msgid "Could not allocate memory for PEM file data." +msgstr "PEM ਫਾਇਲ ਡਾਟੇ ਲਈ ਮੈਮੋਰੀ ਜਾਰੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕੀ" + +#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 +#: ../src/nm-netlink-monitor.c:582 +#: ../src/ip6-manager/nm-netlink-listener.c:352 +#, c-format +msgid "error processing netlink message: %s" +msgstr "ਨੈੱਟਲਿੰਕ ਸੁਨੇਹੇ ਉੱਤੇ ਕਾਰਵਾਈ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ: %s" + +#: ../src/nm-netlink-monitor.c:260 +#, c-format +#| msgid "" +#| "unable to create netlink socket for monitoring wired ethernet devices - %s" +msgid "unable to allocate netlink handle for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਜਾਰੀ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/nm-netlink-monitor.c:270 +#, c-format +#| msgid "" +#| "unable to bind to netlink socket for monitoring wired ethernet devices - %" +#| "s" +msgid "unable to connect to netlink for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਨਾਲ ਕੁਨੈਕਟ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/nm-netlink-monitor.c:278 +#, c-format +#| msgid "" +#| "unable to bind to netlink socket for monitoring wired ethernet devices - %" +#| "s" +msgid "unable to join netlink group for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਗਰੁੱਪ ਜੁਆਇੰਨ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/nm-netlink-monitor.c:286 +#, c-format +#| msgid "" +#| "unable to create netlink socket for monitoring wired ethernet devices - %s" +msgid "unable to allocate netlink link cache for monitoring link status: %s" +msgstr "ਲਿੰਕ ਹਾਲਤ ਦੀ ਨਿਗਰਾਨੀ ਲਈ ਨੈੱਟਲਿੰਕ ਲਿੰਕ ਕੈਸ਼ ਜਾਰੀ ਕਰਨ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/nm-netlink-monitor.c:494 +#: ../src/ip6-manager/nm-netlink-listener.c:382 msgid "error occurred while waiting for data on socket" msgstr "ਸਾਕਟ ਉੱਤੇ ਡਾਟੇ ਦੀ ਉਡੀਕ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ" -#: ../src/nm-ap-security-wpa-eap.c:93 ../src/nm-ap-security-wpa-eap.c:117 -msgid "WPA2 Enterprise" -msgstr "WPA2 ਇੰਟਰਪਰਾਈਸ" +#: ../src/nm-netlink-monitor.c:558 ../src/nm-netlink-monitor.c:571 +#, c-format +msgid "error updating link cache: %s" +msgstr "ਲਿੰਕ ਕੈਸ਼ ਅੱਪਡੇਟ ਕਰਨ ਦੌਰਾਨ ਗਲਤੀ: %s" -#: ../src/nm-ap-security-wpa-eap.c:95 ../src/nm-ap-security-wpa-eap.c:122 -msgid "WPA Enterprise" -msgstr "WPA ਇੰਟਰਪਰਾਈਸ" +#: ../src/main.c:494 +#, c-format +msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgstr "ਗਲਤ ਚੋਣ। ਢੁੱਕਵੀਆਂ ਚੋਣਾਂ ਵੇਖਣ ਲਈ --help ਵਰਤੋਂ ਜੀ।\n" -#: ../src/nm-ap-security-leap.c:66 ../src/nm-ap-security-leap.c:82 -msgid "LEAP" -msgstr "LEAP" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 +msgid "# Created by NetworkManager\n" +msgstr "#ਨੈੱਟਵਰਕ ਮੈਨੇਜਰ ਵਲੋਂ ਬਣਾਈ\n" +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 +#, c-format +msgid "" +"# Merged from %s\n" +"\n" +msgstr "" +"#%s ਤੋਂ ਮਿਲਾਇਆ\n" +"\n" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ਕੋਈ ਵਰਤੋਂਯੋਗ DHCP ਕਲਾਇਟ ਨਹੀਂ ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ਲੱਭਿਆ ਜਾ ਸਕਿਆ।" + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ਗੈਰਸਹਾਇਕ DHCP ਕਲਾਇਟ '%s'" + +#: ../src/ip6-manager/nm-netlink-listener.c:200 +#, c-format +msgid "unable to allocate netlink handle: %s" +msgstr "netlink ਹੈੱਡਲ ਦੇਣ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:210 +#, c-format +msgid "unable to connect to netlink: %s" +msgstr "netlink ਨਾਲ ਕੁਨੈਕਟ ਹੋਣ ਲਈ ਅਸਮਰੱਥ: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:307 +#, c-format +msgid "unable to join netlink group: %s" +msgstr "netlink ਗਰੁੱਪ ਜੁਆਇੰਨ ਕਰਨ ਲਈ ਅਣਸਮਰੱਥ:: %s" + +#: ../src/named-manager/nm-named-manager.c:315 +msgid "NOTE: the libc resolver may not support more than 3 nameservers." +msgstr "ਨੋਟ: libc ਰਿਜ਼ੋਲਵਰ ੩ ਤੋਂ ਵੱਧ ਨੇਮ-ਸਰਵਰ ਲਈ ਸਹਾਇਕ ਨਹੀਂ ਹੋ ਸਕਦਾ ਹੈ।" + +#: ../src/named-manager/nm-named-manager.c:317 +msgid "The nameservers listed below may not be recognized." +msgstr "ਹੇਠਾਂ ਦਿੱਤੇ ਨੇਮ-ਸਰਵਰ ਪਛਾਣੇ ਨਹੀਂ ਜਾ ਸਕਦੇ।" + +#: ../src/system-settings/nm-default-wired-connection.c:157 +#, c-format +msgid "Auto %s" +msgstr "ਆਟੋ %s" + +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 +msgid "System" +msgstr "ਸਿਸਟਮ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "ਸੁਰੱਖਿਅਤ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਕੁਨੈਕਸ਼ਨ ਸਾਂਝਾ ਕਰੋ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "ਓਪਨ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਕੁਨੈਕਸ਼ਨ ਸਾਂਝਾ ਕਰੋ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "ਸਥਿਰ ਸਿਸਟਮ ਹੋਸਟ-ਨਾਂ ਸੋਧ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "ਸਿਸਟਮ ਕੁਨੈਸ਼ਨ ਸੋਧ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਸਿਸਟਮ ਸੈਟਿੰਗ ਲਈ ਸੋਧ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "ਸਿਸਟਮ ਪਾਲਸੀ ਸਥਿਰ ਸਿਸਟਮ ਹੋਸਟ-ਨਾਂ ਲਈ ਸੋਧਾਂ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "" +"ਸਿਸਟਮ ਪਾਲਸੀ ਕੁਨੈਕਸ਼ਨ ਨੂੰ ਸੁਰੱਖਿਅਤ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਸਾਂਝਾ ਕਰਨ ਤੋਂ ਰੋਕਦੀ " +"ਹੈ" + +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "" +"ਸਿਸਟਮ ਪਾਲਸੀ ਕੁਨੈਕਸ਼ਨ ਨੂੰ ਓਪਨ ਵਾਈ-ਫਾਈ ਨੈੱਟਵਰਕ ਰਾਹੀਂ ਸਾਂਝਾ ਕਰਨ ਤੋਂ ਰੋਕਦੀ ਹੈ" + +#~ msgid "Cannot add VPN connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਜੋੜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ ਹੈ" + +#~ msgid "" +#~ "No suitable VPN software was found on your system. Contact your system " +#~ "administrator." +#~ msgstr "" +#~ "ਤੁਹਾਡੇ ਸਿਸਟਮ ਉੱਤੇ ਕੋਈ ਠੀਕ VPN ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਾ ਹੈ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "Cannot import VPN connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਆਯਾਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ" + +#~ msgid "" +#~ "Cannot find suitable software for VPN connection type '%s' to import the " +#~ "file '%s'. Contact your system administrator." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ ਫਾਇਲ '%s' ਆਯਾਤ ਕਰਨ ਲਈ ਕੋਈ ਢੁੱਕਵਾਂ ਸਾਫਟਵੇਅਰ ਨਹੀਂ ਲੱਭਿਆ ਹੈ। " +#~ "ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "" +#~ "Could not find the UI files for VPN connection type '%s'. Contact your " +#~ "system administrator." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ ਕਿਸਮ '%s' ਲਈ UI ਫਾਇਲਾਂ ਨਹੀਂ ਲੱਭੀਆਂ ਹਨ। ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।" + +#~ msgid "Delete VPN connection \"%s\"?" +#~ msgstr "ਕੀ VPN \"%s\" ਕੁਨੈਕਸ਼ਨ ਹਟਾਉਣਾ ਹੈ?" + +#~ msgid "" +#~ "All information about the VPN connection \"%s\" will be lost and you may " +#~ "need your system administrator to provide information to create a new " +#~ "connection." +#~ msgstr "" +#~ "VPN ਕੁਨੈਕਸ਼ਨ \"%s\" ਬਾਰੇ ਸਭ ਜਾਣਕਾਰੀ ਖਤਮ ਹੋ ਗਈ ਹੈ ਅਤੇ ਤੁਹਾਨੂੰ ਨਵੇਂ ਕੁਨੈਕਸ਼ਨ ਬਣਾਉਣ ਲਈ " +#~ "ਜਾਣਕਾਰੀ ਵਾਸਤੇ ਆਪਣੇ ਸਿਸਟਮ ਪਰਸ਼ਾਸ਼ਕ ਨਾਲ ਸੰਪਰਕ ਕਰਨਾ ਪਵੇਗਾ।" + +#~ msgid "Unable to load" +#~ msgstr "ਲੋਡ ਕਰਨ ਲਈ ਫੇਲ੍ਹ" + +#~ msgid "Cannot find some needed resources (the glade file)!" +#~ msgstr "ਕੁਝ ਲੋੜੀਦੇ ਸਰੋਤ ਨਹੀਂ ਮਿਲੇ (ਗਲੇਡ ਫਾਇਲ)!" + +#~ msgid "Create VPN Connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਬਣਾਓ" + +#~ msgid "Edit VPN Connection" +#~ msgstr "VPN ਕੁਨੈਕਸ਼ਨ ਸੋਧ" + +#~ msgid "Add a new VPN connection" +#~ msgstr "ਇੱਕ ਨਵਾਂ VPN ਕੁਨੈਕਸ਼ਨ ਸ਼ਾਮਿਲ" + +#~ msgid "Delete the selected VPN connection" +#~ msgstr "ਚੁਣਿਆ VPN ਕੁਨੈਕਸ਼ਨ ਹਟਾਓ" + +#~ msgid "E_xport" +#~ msgstr "ਨਿਰਯਾਤ(_x)" + +#~ msgid "Edit the selected VPN connection" +#~ msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ 'ਚ ਸੋਧ" + +#~ msgid "Export the VPN settings to a file" +#~ msgstr "VPN ਸੈਟਿੰਗ ਨੂੰ ਫਾਇਲ 'ਚ ਭੇਜੋ" + +#~ msgid "Export the selected VPN connection to a file" +#~ msgstr "ਚੁਣੇ VPN ਕੁਨੈਕਸ਼ਨ ਫਾਇਲ 'ਚ ਭੇਜੋ" + +#~ msgid "Manage Virtual Private Network Connections" +#~ msgstr "ਵੁਰਚੁਅਲ ਪ੍ਰਾਈਵੇਟ ਨੈੱਟਵਰਕ ਕੁਨੈਕਸ਼ਨ ਪਰਬੰਧ" + +#~ msgid "40-bit WEP" +#~ msgstr "40-ਬਿੱਟ WEP" + +#~ msgid "104-bit WEP" +#~ msgstr "104-ਬਿੱਟ WEP" + +#~ msgid "WPA TKIP" +#~ msgstr "WPA TKIP" + +#~ msgid "WPA CCMP" +#~ msgstr "WPA CCMP" + +#~ msgid "WPA Automatic" +#~ msgstr "WPA ਆਟੋਮੈਟਿਕ" + +#~ msgid "WPA2 TKIP" +#~ msgstr "WPA2 TKIP" + +#~ msgid "WPA2 CCMP" +#~ msgstr "WPA2 CCMP" + +#~ msgid "WPA2 Automatic" +#~ msgstr "WPA2 ਆਟੋਮੈਟਿਕ" + +#~ msgid "operation took too long" +#~ msgstr "ਓਪਰੇਸ਼ਨ ਨੂੰ ਬਹੁਤ ਸਮਾਂ ਲੱਗ ਗਿਆ" + +#~ msgid "received data from wrong type of sender" +#~ msgstr "ਭੇਜਣ ਵਾਲੇ ਦੀ ਗਲਤ ਕਿਸਮ ਤੋਂ ਡਾਟਾ ਮਿਲਿਆ" + +#~ msgid "received data from unexpected sender" +#~ msgstr "ਅਣਜਾਣ ਭੇਜਣ ਵਾਲੇ ਵਲੋਂ ਡਾਟਾ ਮਿਲਿਆ" + +#~ msgid "too much data was sent over socket and some of it was lost" +#~ msgstr "ਸਾਕਟ ਉੱਤੇ ਬਹੁਤ ਵੱਧ ਡਾਟਾ ਭੇਜਿਆ ਗਿਆ ਅਤੇ ਇਸ 'ਚੋਂ ਕੁਝ ਗੁੰਮ ਹੋ ਗਿਆ" + +#~ msgid "LEAP" +#~ msgstr "LEAP" From a7e3d2acc29d3e7c267298df9a19a514ca628b37 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 01:55:04 -0700 Subject: [PATCH 004/105] olpc-mesh: fix companion device detection crash The original OLPC mesh patch confused g_source_remove() with g_signal_handler_disconnect(), so the signal handler that the mesh device creates for the managers 'device-added' signal was getting called after that mesh device instance was freed, which is of course bad. --- src/nm-device-olpc-mesh.c | 43 +++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 2a1a235330..807db94bd3 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -109,7 +109,7 @@ struct _NMDeviceOlpcMeshPrivate NMDevice * companion; gboolean stage1_waiting; - guint device_added_cb; + guint device_added_id; }; static GQuark @@ -345,9 +345,7 @@ device_cleanup (NMDeviceOlpcMesh *self) static void real_take_down (NMDevice *dev) { - NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (dev); - - device_cleanup (self); + device_cleanup (NM_DEVICE_OLPC_MESH (dev)); } static gboolean @@ -650,24 +648,24 @@ real_act_stage4_ip4_config_timeout (NMDevice *dev, static void -nm_device_olpc_mesh_dispose (GObject *object) +dispose (GObject *object) { NMDeviceOlpcMesh *self = NM_DEVICE_OLPC_MESH (object); NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); + NMManager *manager; if (priv->dispose_has_run) { G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object); return; } - priv->dispose_has_run = TRUE; device_cleanup (self); - if (priv->device_added_cb != 0) - g_source_remove (priv->device_added_cb); - - priv->device_added_cb = 0; + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + if (priv->device_added_id) + g_signal_handler_disconnect (manager, priv->device_added_id); + g_object_unref (manager); G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class)->dispose (object); } @@ -731,7 +729,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) object_class->constructor = constructor; object_class->get_property = get_property; object_class->set_property = set_property; - object_class->dispose = nm_device_olpc_mesh_dispose; + object_class->dispose = dispose; parent_class->get_type_capabilities = NULL; parent_class->get_generic_capabilities = real_get_generic_capabilities; @@ -862,6 +860,7 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) { NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); struct ether_addr their_addr; + NMManager *manager; if (!NM_IS_DEVICE_WIFI (other)) return FALSE; @@ -876,14 +875,21 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) /* FIXME detect when our companion leaves */ priv->companion = other; - g_source_remove (priv->device_added_cb); - priv->device_added_cb = 0; + /* When we've found the companion, stop listening for other devices */ + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + if (priv->device_added_id) { + g_signal_handler_disconnect (manager, priv->device_added_id); + priv->device_added_id = 0; + } + g_object_unref (manager); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); - nm_debug ("Found companion device: %s", nm_device_get_iface (other)); + nm_info ("(%s): found companion WiFi device %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_iface (other)); g_signal_connect (G_OBJECT (other), "state-changed", G_CALLBACK (companion_state_changed_cb), self); @@ -922,18 +928,19 @@ check_companion_cb (gpointer user_data) return FALSE; } - if (priv->device_added_cb != 0) + if (priv->device_added_id != 0) return FALSE; manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); - priv->device_added_cb = g_signal_connect (manager, "device-added", + priv->device_added_id = g_signal_connect (manager, "device-added", G_CALLBACK (device_added_cb), self); - list = nm_manager_get_devices (manager); - for (; list != NULL ; list = list->next) + /* Try to find the companion if it's already known to the NMManager */ + for (list = nm_manager_get_devices (manager); list ; list = g_slist_next (list)) { if (is_companion (self, NM_DEVICE (list->data))) break; + } g_object_unref (manager); From e9b7ecef53e44ac3106be0623649009c95bd600e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 00:45:45 -0700 Subject: [PATCH 005/105] doc: fix default value retrieval for settings specification generator --- docs/generate-settings-spec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/generate-settings-spec.c b/docs/generate-settings-spec.c index dd78fc9211..d7a391f9b0 100644 --- a/docs/generate-settings-spec.c +++ b/docs/generate-settings-spec.c @@ -128,6 +128,7 @@ write_one_setting (FILE *f, SettingNewFunc func) value_desc = g_param_spec_get_blurb (*iter); g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (*iter)); + g_param_value_set_default (*iter, &value); default_value = g_strdup_value_contents (&value); if (default_value && !strcmp (default_value, "NULL")) { g_free (default_value); From 043ce2c655d1bd6d99bf61c2b11b5cda7d0965af Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 12:48:53 -0700 Subject: [PATCH 006/105] core: clear secrets on successful connection too This ensures that the next time secrets are required, they will be requested from the settings service. Internally, NM shouldn't be caching secrets; it should always request them from the settings service so that the settings service can enforce policy about password lifetime, if it wants to. --- src/nm-policy.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/nm-policy.c b/src/nm-policy.c index 6ee4e0eb6a..b1d3ba6ec7 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -803,10 +803,16 @@ device_state_changed (NMDevice *device, schedule_activate_check (policy, device, 3); break; case NM_DEVICE_STATE_ACTIVATED: - /* Clear the invalid tag on the connection */ - if (connection) + if (connection) { + /* Clear the invalid tag on the connection */ g_object_set_data (G_OBJECT (connection), INVALID_TAG, NULL); + /* And clear secrets so they will always be requested from the + * settings service when the next connection is made. + */ + nm_connection_clear_secrets (connection); + } + update_routing_and_dns (policy, FALSE); break; case NM_DEVICE_STATE_UNMANAGED: From 32128b04cad02e6608617f530ca848b44da80ebe Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:23:08 -0700 Subject: [PATCH 007/105] logging: add basic logging capabilities --- src/main.c | 15 +++- src/nm-logging.c | 205 ++++++++++++++++++++++++++++++++++++++--------- src/nm-logging.h | 51 +++++++++++- 3 files changed, 230 insertions(+), 41 deletions(-) diff --git a/src/main.c b/src/main.c index f8312fa54e..59f0dcb823 100644 --- a/src/main.c +++ b/src/main.c @@ -442,6 +442,7 @@ main (int argc, char *argv[]) gboolean g_fatal_warnings = FALSE; char *pidfile = NULL, *state_file = NULL, *dhcp = NULL; char *config = NULL, *plugins = NULL, *conf_plugins = NULL; + char *log_level = NULL, *log_domains = NULL; gboolean wifi_enabled = TRUE, net_enabled = TRUE, wwan_enabled = TRUE; gboolean success; NMPolicy *policy = NULL; @@ -460,6 +461,10 @@ main (int argc, char *argv[]) { "state-file", 0, 0, G_OPTION_ARG_FILENAME, &state_file, "State file location", "/path/to/state.file" }, { "config", 0, 0, G_OPTION_ARG_FILENAME, &config, "Config file location", "/path/to/config.file" }, { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ,", "plugin1,plugin2" }, + { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, + { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, + "Log domains separated by ,: any combination of [HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", + "HW,RFKILL,WIFI" }, {NULL} }; @@ -495,6 +500,14 @@ main (int argc, char *argv[]) exit (1); } + /* Logging setup */ + if (!nm_logging_setup (log_level, log_domains, &error)) { + fprintf (stderr, + _("%s. Please use --help to see a list of valid options.\n"), + error->message); + exit (1); + } + pidfile = pidfile ? pidfile : g_strdup (NM_DEFAULT_PID_FILE); state_file = state_file ? state_file : g_strdup (NM_DEFAULT_SYSTEM_STATE_FILE); @@ -600,7 +613,7 @@ main (int argc, char *argv[]) setup_signals (); - nm_logging_setup (become_daemon); + nm_logging_start (become_daemon); nm_info ("starting..."); success = FALSE; diff --git a/src/nm-logging.c b/src/nm-logging.c index f47461526f..b431949acc 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -30,10 +30,150 @@ #include #include #include +#include +#include + +#include #include "nm-logging.h" #include "nm-utils.h" +static guint32 log_level = LOGL_ERR; +static guint32 log_domains = LOGD_CORE & LOGD_HW; + +typedef struct { + guint32 num; + const char *name; +} LogDesc; + +static const LogDesc level_descs[] = { + { LOGL_ERR, "ERR" }, + { LOGL_WARN, "WARN" }, + { LOGL_INFO, "INFO" }, + { LOGL_DEBUG, "DEBUG" }, + { 0, NULL } +}; + +static const LogDesc domain_descs[] = { + { LOGD_HW, "HW" }, + { LOGD_RFKILL, "RFKILL" }, + { LOGD_ETHER, "ETHER" }, + { LOGD_WIFI, "WIFI" }, + { LOGD_BT, "BT" }, + { LOGD_MB, "MB" }, + { LOGD_DHCP4, "DHCP4" }, + { LOGD_DHCP6, "DHCP6" }, + { LOGD_PPP, "PPP" }, + { LOGD_WIFI_SCAN, "WIFI_SCAN" }, + { LOGD_IP4, "IP4" }, + { LOGD_IP6, "IP6" }, + { LOGD_AUTOIP4, "AUTOIP4" }, + { LOGD_DNS, "DNS" }, + { LOGD_VPN, "VPN" }, + { LOGD_SHARING, "SHARING" }, + { LOGD_SUPPLICANT,"SUPPLICANT" }, + { LOGD_USER_SET, "USER_SET" }, + { LOGD_SYS_SET, "SYS_SET" }, + { LOGD_SUSPEND, "SUSPEND" }, + { LOGD_CORE, "CORE" }, + { 0, NULL } +}; + + +/************************************************************************/ + +gboolean +nm_logging_setup (const char *level, const char *domains, GError **error) +{ + char **tmp, **iter; + guint32 new_level = 0; + guint32 new_domains = 0; + + /* levels */ + if (level && strlen (level)) { + tmp = g_strsplit (level, ",", 0); + for (iter = tmp; iter && *iter; iter++) { + const LogDesc *diter; + gboolean found = FALSE; + + for (diter = &level_descs[0]; diter->name; diter++) { + if (!strcasecmp (diter->name, *iter)) { + new_level &= diter->num; + found = TRUE; + break; + } + } + + if (!found) { + g_set_error (error, 0, 0, _("Unknown log level '%s'"), *iter); + return FALSE; + } + } + g_strfreev (tmp); + log_level = new_level; + } + + /* domains */ + if (domains && strlen (domains)) { + tmp = g_strsplit (domains, ",", 0); + for (iter = tmp; iter && *iter; iter++) { + const LogDesc *diter; + gboolean found = FALSE; + + for (diter = &domain_descs[0]; diter->name; diter++) { + if (!strcasecmp (diter->name, *iter)) { + new_domains &= diter->num; + found = TRUE; + break; + } + } + + if (!found) { + g_set_error (error, 0, 0, _("Unknown log domain '%s'"), *iter); + return FALSE; + } + } + g_strfreev (tmp); + log_domains = new_domains; + } + + return TRUE; +} + +void _nm_log (const char *loc, + const char *func, + guint32 domain, + guint32 level, + const char *fmt, + ...) +{ + va_list args; + char *msg; + GTimeVal tv; + + if (!(log_level & level) || !(log_domains & domain)) + return; + + va_start (args, fmt); + msg = g_strdup_vprintf (fmt, args); + va_end (args); + + if (log_level & LOGL_DEBUG) { + g_get_current_time (&tv); + syslog (LOG_DEBUG, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + } else if (log_level & LOGL_INFO) + syslog (LOG_INFO, " [%s] %s(): %s\n", loc, func, msg); + else if (log_level & LOGL_WARN) + syslog (LOG_WARNING, " [%s] %s(): %s\n", loc, func, msg); + else if (log_level & LOGL_ERR) { + g_get_current_time (&tv); + syslog (LOG_ERR, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + } + g_free (msg); +} + +/************************************************************************/ + static void fallback_get_backtrace (void) { @@ -115,47 +255,40 @@ nm_logging_backtrace (void) static void -nm_log_handler (const gchar * log_domain, - GLogLevelFlags log_level, - const gchar * message, - gpointer ignored) +nm_log_handler (const gchar *log_domain, + GLogLevelFlags level, + const gchar *message, + gpointer ignored) { int syslog_priority; - switch (log_level) - { - case G_LOG_LEVEL_ERROR: - syslog_priority = LOG_CRIT; - break; - - case G_LOG_LEVEL_CRITICAL: - syslog_priority = LOG_ERR; - break; - - case G_LOG_LEVEL_WARNING: - syslog_priority = LOG_WARNING; - break; - - case G_LOG_LEVEL_MESSAGE: - syslog_priority = LOG_NOTICE; - break; - - case G_LOG_LEVEL_DEBUG: - syslog_priority = LOG_DEBUG; - break; - - case G_LOG_LEVEL_INFO: - default: - syslog_priority = LOG_INFO; - break; + switch (level) { + case G_LOG_LEVEL_ERROR: + syslog_priority = LOG_CRIT; + break; + case G_LOG_LEVEL_CRITICAL: + syslog_priority = LOG_ERR; + break; + case G_LOG_LEVEL_WARNING: + syslog_priority = LOG_WARNING; + break; + case G_LOG_LEVEL_MESSAGE: + syslog_priority = LOG_NOTICE; + break; + case G_LOG_LEVEL_DEBUG: + syslog_priority = LOG_DEBUG; + break; + case G_LOG_LEVEL_INFO: + default: + syslog_priority = LOG_INFO; + break; } syslog (syslog_priority, "%s", message); } - void -nm_logging_setup (gboolean become_daemon) +nm_logging_start (gboolean become_daemon) { if (become_daemon) openlog (G_LOG_DOMAIN, 0, LOG_DAEMON); @@ -163,9 +296,9 @@ nm_logging_setup (gboolean become_daemon) openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_USER); g_log_set_handler (G_LOG_DOMAIN, - G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - nm_log_handler, - NULL); + G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, + nm_log_handler, + NULL); } void diff --git a/src/nm-logging.h b/src/nm-logging.h index 70979fa3ab..60b15c2f57 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -24,8 +24,51 @@ #include -void nm_logging_setup (gboolean become_daemon); -void nm_logging_backtrace (void); -void nm_logging_shutdown (void); +/* Log domains */ +enum { + LOGD_NONE = 0x00000000, + LOGD_HW = 0x00000001, + LOGD_RFKILL = 0x00000002, + LOGD_ETHER = 0x00000004, + LOGD_WIFI = 0x00000008, + LOGD_BT = 0x00000010, + LOGD_MB = 0x00000020, /* mobile broadband */ + LOGD_DHCP4 = 0x00000040, + LOGD_DHCP6 = 0x00000080, + LOGD_PPP = 0x00000100, + LOGD_WIFI_SCAN = 0x00000200, + LOGD_IP4 = 0x00000400, + LOGD_IP6 = 0x00000800, + LOGD_AUTOIP4 = 0x00001000, + LOGD_DNS = 0x00002000, + LOGD_VPN = 0x00004000, + LOGD_SHARING = 0x00008000, + LOGD_SUPPLICANT = 0x00010000, + LOGD_USER_SET = 0x00020000, + LOGD_SYS_SET = 0x00040000, + LOGD_SUSPEND = 0x00080000, + LOGD_CORE = 0x00100000, /* Core daemon and policy stuff */ +}; + +/* Log levels */ +enum { + LOGL_ERR = 0x00000000, + LOGL_WARN = 0x00000001, + LOGL_INFO = 0x00000002, + LOGL_DEBUG = 0x00000004 +}; + +#define nm_log(domain, level, fmt, args...) \ + { _nm_log (G_STRFUNC, G_STRLOC, domain, level, fmt, ##args); } + +void _nm_log (const char *func, const char *loc, + guint32 domain, guint32 level, + const char *fmt, ...); + + +gboolean nm_logging_setup (const char *level, const char *domains, GError **error); +void nm_logging_start (gboolean become_daemon); +void nm_logging_backtrace (void); +void nm_logging_shutdown (void); #endif /* NM_LOGGING_H */ From e19bac4cd0c4be5d8dd325f4c8d0fa42d8f4e6b8 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:27:35 -0700 Subject: [PATCH 008/105] core: use fprintf before logging is set up --- src/main.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main.c b/src/main.c index 59f0dcb823..b76484a947 100644 --- a/src/main.c +++ b/src/main.c @@ -237,18 +237,18 @@ write_pidfile (const char *pidfile) gboolean success = FALSE; if ((fd = open (pidfile, O_CREAT|O_WRONLY|O_TRUNC, 00644)) < 0) { - nm_warning ("Opening %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Opening %s failed: %s", pidfile, strerror (errno)); return FALSE; } snprintf (pid, sizeof (pid), "%d", getpid ()); if (write (fd, pid, strlen (pid)) < 0) - nm_warning ("Writing to %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Writing to %s failed: %s", pidfile, strerror (errno)); else success = TRUE; if (close (fd)) - nm_warning ("Closing %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Closing %s failed: %s", pidfile, strerror (errno)); return success; } @@ -291,7 +291,7 @@ check_pidfile (const char *pidfile) if (strcmp (process_name, "NetworkManager") == 0) { /* Check that the process exists */ if (kill (pid, 0) == 0) { - g_warning ("NetworkManager is already running (pid %ld)", pid); + fprintf (stderr, "NetworkManager is already running (pid %ld)", pid); nm_running = TRUE; } } @@ -469,12 +469,12 @@ main (int argc, char *argv[]) }; if (getuid () != 0) { - g_printerr ("You must be root to run NetworkManager!\n"); + fprintf (stderr, "You must be root to run NetworkManager!\n"); exit (1); } if (!g_module_supported ()) { - g_printerr ("GModules are not supported on your platform!"); + fprintf (stderr, "GModules are not supported on your platform!"); exit (1); } @@ -518,10 +518,10 @@ main (int argc, char *argv[]) /* Parse the config file */ if (config) { if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { - g_warning ("Config file %s invalid: (%d) %s.", - config, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + fprintf (stderr, "Config file %s invalid: (%d) %s.", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); exit (1); } } else { @@ -532,10 +532,10 @@ main (int argc, char *argv[]) config = g_strdup (NM_DEFAULT_SYSTEM_CONF_FILE); parsed = parse_config_file (config, &conf_plugins, &dhcp, &error); if (!parsed) { - g_warning ("Default config file %s invalid: (%d) %s.", - config, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + fprintf (stderr, "Default config file %s invalid: (%d) %s.", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_free (config); config = NULL; g_clear_error (&error); @@ -547,10 +547,10 @@ main (int argc, char *argv[]) if (!parsed) { config = g_strdup (NM_OLD_SYSTEM_CONF_FILE); if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { - g_warning ("Default config file %s invalid: (%d) %s.", - config, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + fprintf (stderr, "Default config file %s invalid: (%d) %s.", + config, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_free (config); config = NULL; g_clear_error (&error); @@ -565,10 +565,10 @@ main (int argc, char *argv[]) /* Parse the state file */ if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &error)) { - g_warning ("State file %s parsing failed: (%d) %s.", - state_file, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + fprintf (stderr, "State file %s parsing failed: (%d) %s.", + state_file, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); /* Not a hard failure */ } g_clear_error (&error); @@ -582,9 +582,9 @@ main (int argc, char *argv[]) int saved_errno; saved_errno = errno; - nm_error ("Could not daemonize: %s [error %u]", - g_strerror (saved_errno), - saved_errno); + fprintf (stderr, "Could not daemonize: %s [error %u]", + g_strerror (saved_errno), + saved_errno); exit (1); } if (write_pidfile (pidfile)) From 8e1ad970562e30faa7bd1aed9b43e044d0fe237a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:28:33 -0700 Subject: [PATCH 009/105] core: options help text cleanup --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index b76484a947..1e54cb0d83 100644 --- a/src/main.c +++ b/src/main.c @@ -460,10 +460,10 @@ main (int argc, char *argv[]) { "pid-file", 0, 0, G_OPTION_ARG_FILENAME, &pidfile, "Specify the location of a PID file", "filename" }, { "state-file", 0, 0, G_OPTION_ARG_FILENAME, &state_file, "State file location", "/path/to/state.file" }, { "config", 0, 0, G_OPTION_ARG_FILENAME, &config, "Config file location", "/path/to/config.file" }, - { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ,", "plugin1,plugin2" }, + { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, - "Log domains separated by ,: any combination of [HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", + "Log domains separated by ',': any combination of [HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", "HW,RFKILL,WIFI" }, {NULL} }; From f46e1f6a43682cc7374240c7f2144168d966553e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:45:49 -0700 Subject: [PATCH 010/105] logging: fix default log level and tweak info/warn output --- src/nm-logging.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/nm-logging.c b/src/nm-logging.c index b431949acc..df49a6d300 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -38,8 +38,8 @@ #include "nm-logging.h" #include "nm-utils.h" -static guint32 log_level = LOGL_ERR; -static guint32 log_domains = LOGD_CORE & LOGD_HW; +static guint32 log_level = LOGL_INFO; +static guint32 log_domains = LOGD_CORE | LOGD_HW; typedef struct { guint32 num; @@ -137,6 +137,7 @@ nm_logging_setup (const char *level, const char *domains, GError **error) log_domains = new_domains; } + fprintf (stdout, "NetworkManager: log level: 0x%04X log domains: 0x%08X\n", log_level, log_domains); return TRUE; } @@ -162,9 +163,9 @@ void _nm_log (const char *loc, g_get_current_time (&tv); syslog (LOG_DEBUG, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); } else if (log_level & LOGL_INFO) - syslog (LOG_INFO, " [%s] %s(): %s\n", loc, func, msg); + syslog (LOG_INFO, " %s\n", msg); else if (log_level & LOGL_WARN) - syslog (LOG_WARNING, " [%s] %s(): %s\n", loc, func, msg); + syslog (LOG_WARNING, " %s\n", msg); else if (log_level & LOGL_ERR) { g_get_current_time (&tv); syslog (LOG_ERR, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); From 52c2422f727fbb0992cc61a04f8dea23f5bd1130 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:46:03 -0700 Subject: [PATCH 011/105] logging: add log level helpers --- src/nm-logging.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nm-logging.h b/src/nm-logging.h index 60b15c2f57..8880053143 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -58,6 +58,18 @@ enum { LOGL_DEBUG = 0x00000004 }; +#define nm_log_err(domain, fmt, args...) \ + { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_ERR, fmt, ##args); } + +#define nm_log_warn(domain, fmt, args...) \ + { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_WARN, fmt, ##args); } + +#define nm_log_info(domain, fmt, args...) \ + { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_INFO, fmt, ##args); } + +#define nm_log_dbg(domain, fmt, args...) \ + { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_DEBUG, fmt, ##args); } + #define nm_log(domain, level, fmt, args...) \ { _nm_log (G_STRFUNC, G_STRLOC, domain, level, fmt, ##args); } From e0df501e0ea0596826c185051bd0493827c35134 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:48:12 -0700 Subject: [PATCH 012/105] logging: remove initial log level & facility message --- src/nm-logging.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nm-logging.c b/src/nm-logging.c index df49a6d300..464dd024b2 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -137,7 +137,6 @@ nm_logging_setup (const char *level, const char *domains, GError **error) log_domains = new_domains; } - fprintf (stdout, "NetworkManager: log level: 0x%04X log domains: 0x%08X\n", log_level, log_domains); return TRUE; } From c0a455d34405f31dcb59bd57bdb951a642b05f1b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:48:31 -0700 Subject: [PATCH 013/105] core: clean up logging in main.c --- src/main.c | 74 ++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/src/main.c b/src/main.c index 1e54cb0d83..e0baad5df5 100644 --- a/src/main.c +++ b/src/main.c @@ -40,7 +40,6 @@ #include #include "NetworkManager.h" -#include "nm-utils.h" #include "NetworkManagerUtils.h" #include "nm-manager.h" #include "nm-policy.h" @@ -75,7 +74,7 @@ typedef struct { static gboolean detach_monitor (gpointer data) { - nm_info ("Detaching netlink event monitor"); + nm_log_warn (LOGD_HW, "detaching netlink event monitor"); nm_netlink_monitor_detach (NM_NETLINK_MONITOR (data)); return FALSE; } @@ -90,10 +89,11 @@ nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor, now = time (NULL); - if (info->domain != error->domain || info->code != error->code || (info->time && now > info->time + 10)) { + if ( (info->domain != error->domain) + || (info->code != error->code) + || (info->time && now > info->time + 10)) { /* FIXME: Try to handle the error instead of just printing it. */ - nm_warning ("error monitoring device for netlink events: %s\n", - error->message); + nm_log_warn (LOGD_HW, "error monitoring device for netlink events: %s\n", error->message); info->time = now; info->domain = error->domain; @@ -106,26 +106,20 @@ nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor, /* Broken drivers will sometimes cause a flood of netlink errors. * rh #459205, novell #443429, lp #284507 */ - nm_warning ("Excessive netlink errors ocurred, disabling netlink monitor."); - nm_warning ("Link change events will not be processed."); + nm_log_warn (LOGD_HW, "excessive netlink errors ocurred, disabling netlink monitor."); + nm_log_warn (LOGD_HW, "link change events will not be processed."); g_idle_add_full (G_PRIORITY_HIGH, detach_monitor, monitor, NULL); } } static gboolean -nm_monitor_setup (void) +nm_monitor_setup (GError **error) { - GError *error = NULL; NMNetlinkMonitor *monitor; MonitorInfo *info; monitor = nm_netlink_monitor_get (); - nm_netlink_monitor_open_connection (monitor, &error); - if (error != NULL) - { - nm_warning ("could not monitor wired ethernet devices: %s", - error->message); - g_error_free (error); + if (!nm_netlink_monitor_open_connection (monitor, error)) { g_object_unref (monitor); return FALSE; } @@ -136,7 +130,6 @@ nm_monitor_setup (void) info, (GClosureNotify) g_free, 0); - nm_netlink_monitor_attach (monitor); /* Request initial status of cards */ @@ -163,7 +156,7 @@ nm_signal_handler (int signo) case SIGBUS: case SIGILL: case SIGABRT: - nm_warning ("Caught signal %d. Generating backtrace...", signo); + nm_log_warn (LOGD_CORE, "caught signal %d. Generating backtrace...", signo); nm_logging_backtrace (); exit (1); break; @@ -173,7 +166,7 @@ nm_signal_handler (int signo) /* let the fatal signals interrupt us */ --in_fatal; - nm_warning ("Caught signal %d, shutting down abnormally. Generating backtrace...", signo); + nm_log_warn (LOGD_CORE, "caught signal %d, shutting down abnormally. Generating backtrace...", signo); nm_logging_backtrace (); g_main_loop_quit (main_loop); break; @@ -183,7 +176,7 @@ nm_signal_handler (int signo) /* let the fatal signals interrupt us */ --in_fatal; - nm_warning ("Caught signal %d, shutting down normally.", signo); + nm_log_info (LOGD_CORE, "caught signal %d, shutting down normally.", signo); quit_early = TRUE; g_main_loop_quit (main_loop); break; @@ -237,18 +230,18 @@ write_pidfile (const char *pidfile) gboolean success = FALSE; if ((fd = open (pidfile, O_CREAT|O_WRONLY|O_TRUNC, 00644)) < 0) { - fprintf (stderr, "Opening %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Opening %s failed: %s\n", pidfile, strerror (errno)); return FALSE; } snprintf (pid, sizeof (pid), "%d", getpid ()); if (write (fd, pid, strlen (pid)) < 0) - fprintf (stderr, "Writing to %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Writing to %s failed: %s\n", pidfile, strerror (errno)); else success = TRUE; if (close (fd)) - fprintf (stderr, "Closing %s failed: %s", pidfile, strerror (errno)); + fprintf (stderr, "Closing %s failed: %s\n", pidfile, strerror (errno)); return success; } @@ -291,7 +284,7 @@ check_pidfile (const char *pidfile) if (strcmp (process_name, "NetworkManager") == 0) { /* Check that the process exists */ if (kill (pid, 0) == 0) { - fprintf (stderr, "NetworkManager is already running (pid %ld)", pid); + fprintf (stderr, "NetworkManager is already running (pid %ld)\n", pid); nm_running = TRUE; } } @@ -474,7 +467,7 @@ main (int argc, char *argv[]) } if (!g_module_supported ()) { - fprintf (stderr, "GModules are not supported on your platform!"); + fprintf (stderr, "GModules are not supported on your platform!\n"); exit (1); } @@ -518,7 +511,7 @@ main (int argc, char *argv[]) /* Parse the config file */ if (config) { if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { - fprintf (stderr, "Config file %s invalid: (%d) %s.", + fprintf (stderr, "Config file %s invalid: (%d) %s\n", config, error ? error->code : -1, (error && error->message) ? error->message : "unknown"); @@ -532,7 +525,7 @@ main (int argc, char *argv[]) config = g_strdup (NM_DEFAULT_SYSTEM_CONF_FILE); parsed = parse_config_file (config, &conf_plugins, &dhcp, &error); if (!parsed) { - fprintf (stderr, "Default config file %s invalid: (%d) %s.", + fprintf (stderr, "Default config file %s invalid: (%d) %s\n", config, error ? error->code : -1, (error && error->message) ? error->message : "unknown"); @@ -547,7 +540,7 @@ main (int argc, char *argv[]) if (!parsed) { config = g_strdup (NM_OLD_SYSTEM_CONF_FILE); if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { - fprintf (stderr, "Default config file %s invalid: (%d) %s.", + fprintf (stderr, "Default config file %s invalid: (%d) %s\n", config, error ? error->code : -1, (error && error->message) ? error->message : "unknown"); @@ -565,7 +558,7 @@ main (int argc, char *argv[]) /* Parse the state file */ if (!parse_state_file (state_file, &net_enabled, &wifi_enabled, &wwan_enabled, &error)) { - fprintf (stderr, "State file %s parsing failed: (%d) %s.", + fprintf (stderr, "State file %s parsing failed: (%d) %s\n", state_file, error ? error->code : -1, (error && error->message) ? error->message : "unknown"); @@ -582,7 +575,7 @@ main (int argc, char *argv[]) int saved_errno; saved_errno = errno; - fprintf (stderr, "Could not daemonize: %s [error %u]", + fprintf (stderr, "Could not daemonize: %s [error %u]\n", g_strerror (saved_errno), saved_errno); exit (1); @@ -615,27 +608,30 @@ main (int argc, char *argv[]) nm_logging_start (become_daemon); - nm_info ("starting..."); + nm_log_info (LOGD_CORE, "starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE); /* Create watch functions that monitor cards for link status. */ - if (!nm_monitor_setup ()) + if (!nm_monitor_setup (&error)) { + nm_log_err (LOGD_CORE, "failed to start monitoring devices: %s.", + error && error->message ? error->message : "(unknown)"); goto done; + } /* Initialize our DBus service & connection */ dbus_mgr = nm_dbus_manager_get (); vpn_manager = nm_vpn_manager_get (); if (!vpn_manager) { - nm_warning ("Failed to start the VPN manager."); + nm_log_err (LOGD_CORE, "failed to start the VPN manager."); goto done; } named_mgr = nm_named_manager_get (); if (!named_mgr) { - nm_warning ("Failed to start the named manager."); + nm_log_err (LOGD_CORE, "failed to start the named manager."); goto done; } @@ -647,28 +643,28 @@ main (int argc, char *argv[]) wwan_enabled, &error); if (manager == NULL) { - nm_error ("Failed to initialize the network manager: %s", + nm_log_err (LOGD_CORE, "failed to initialize the network manager: %s", error && error->message ? error->message : "(unknown)"); goto done; } policy = nm_policy_new (manager, vpn_manager); if (policy == NULL) { - nm_error ("Failed to initialize the policy."); + nm_log_err (LOGD_CORE, "failed to initialize the policy."); goto done; } /* Initialize the supplicant manager */ sup_mgr = nm_supplicant_manager_get (); if (!sup_mgr) { - nm_error ("Failed to initialize the supplicant manager."); + nm_log_err (LOGD_CORE, "failed to initialize the supplicant manager."); goto done; } /* Initialize DHCP manager */ dhcp_mgr = nm_dhcp_manager_new (dhcp, &error); if (!dhcp_mgr) { - nm_warning ("Failed to start the DHCP manager: %s.", error->message); + nm_log_err (LOGD_CORE, "failed to start the DHCP manager: %s.", error->message); goto done; } @@ -676,7 +672,7 @@ main (int argc, char *argv[]) /* Start our DBus service */ if (!nm_dbus_manager_start_service (dbus_mgr)) { - nm_warning ("Failed to start the dbus service."); + nm_log_err (LOGD_CORE, "failed to start the dbus service."); goto done; } @@ -727,6 +723,6 @@ done: g_free (plugins); g_free (dhcp); - nm_info ("exiting (%s)", success ? "success" : "error"); + nm_log_info (LOGD_CORE, "exiting (%s)", success ? "success" : "error"); exit (success ? 0 : 1); } From d03de42350e7cadd77e622543c076d96b99ff457 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:53:37 -0700 Subject: [PATCH 014/105] logging: one level at a time; levels are cumulative --- src/nm-logging.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/nm-logging.c b/src/nm-logging.c index 464dd024b2..a07a5da69b 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -48,9 +48,9 @@ typedef struct { static const LogDesc level_descs[] = { { LOGL_ERR, "ERR" }, - { LOGL_WARN, "WARN" }, - { LOGL_INFO, "INFO" }, - { LOGL_DEBUG, "DEBUG" }, + { LOGL_WARN | LOGL_ERR, "WARN" }, + { LOGL_INFO | LOGL_WARN | LOGL_ERR, "INFO" }, + { LOGL_DEBUG | LOGL_INFO | LOGL_WARN | LOGL_ERR, "DEBUG" }, { 0, NULL } }; @@ -86,31 +86,25 @@ gboolean nm_logging_setup (const char *level, const char *domains, GError **error) { char **tmp, **iter; - guint32 new_level = 0; guint32 new_domains = 0; /* levels */ if (level && strlen (level)) { - tmp = g_strsplit (level, ",", 0); - for (iter = tmp; iter && *iter; iter++) { - const LogDesc *diter; - gboolean found = FALSE; + gboolean found = FALSE; + const LogDesc *diter; - for (diter = &level_descs[0]; diter->name; diter++) { - if (!strcasecmp (diter->name, *iter)) { - new_level &= diter->num; - found = TRUE; - break; - } - } - - if (!found) { - g_set_error (error, 0, 0, _("Unknown log level '%s'"), *iter); - return FALSE; + for (diter = &level_descs[0]; diter->name; diter++) { + if (!strcasecmp (diter->name, level)) { + log_level = diter->num; + found = TRUE; + break; } } - g_strfreev (tmp); - log_level = new_level; + + if (!found) { + g_set_error (error, 0, 0, _("Unknown log level '%s'"), level); + return FALSE; + } } /* domains */ From 3e8a05d28e193b654c98d395262501b8999a0557 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 15:57:24 -0700 Subject: [PATCH 015/105] logging: allow logging control from the config file --- src/main.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/main.c b/src/main.c index e0baad5df5..2b0085abba 100644 --- a/src/main.c +++ b/src/main.c @@ -299,6 +299,8 @@ static gboolean parse_config_file (const char *filename, char **plugins, char **dhcp_client, + char **log_level, + char **log_domains, GError **error) { GKeyFile *config; @@ -320,6 +322,9 @@ parse_config_file (const char *filename, *dhcp_client = g_key_file_get_value (config, "main", "dhcp", NULL); + *log_level = g_key_file_get_value (config, "main", "log-level", NULL); + *log_domains = g_key_file_get_value (config, "main", "log-domains", NULL); + g_key_file_free (config); return TRUE; } @@ -446,6 +451,7 @@ main (int argc, char *argv[]) NMDHCPManager *dhcp_mgr = NULL; GError *error = NULL; gboolean wrote_pidfile = FALSE; + char *cfg_log_level = NULL, *cfg_log_domains = NULL; GOptionEntry options[] = { { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &become_daemon, "Don't become a daemon", NULL }, @@ -493,14 +499,6 @@ main (int argc, char *argv[]) exit (1); } - /* Logging setup */ - if (!nm_logging_setup (log_level, log_domains, &error)) { - fprintf (stderr, - _("%s. Please use --help to see a list of valid options.\n"), - error->message); - exit (1); - } - pidfile = pidfile ? pidfile : g_strdup (NM_DEFAULT_PID_FILE); state_file = state_file ? state_file : g_strdup (NM_DEFAULT_SYSTEM_STATE_FILE); @@ -510,7 +508,7 @@ main (int argc, char *argv[]) /* Parse the config file */ if (config) { - if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { + if (!parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error)) { fprintf (stderr, "Config file %s invalid: (%d) %s\n", config, error ? error->code : -1, @@ -523,7 +521,7 @@ main (int argc, char *argv[]) /* Try NetworkManager.conf first */ if (g_file_test (NM_DEFAULT_SYSTEM_CONF_FILE, G_FILE_TEST_EXISTS)) { config = g_strdup (NM_DEFAULT_SYSTEM_CONF_FILE); - parsed = parse_config_file (config, &conf_plugins, &dhcp, &error); + parsed = parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error); if (!parsed) { fprintf (stderr, "Default config file %s invalid: (%d) %s\n", config, @@ -539,7 +537,7 @@ main (int argc, char *argv[]) /* Try old nm-system-settings.conf next */ if (!parsed) { config = g_strdup (NM_OLD_SYSTEM_CONF_FILE); - if (!parse_config_file (config, &conf_plugins, &dhcp, &error)) { + if (!parse_config_file (config, &conf_plugins, &dhcp, &cfg_log_level, &cfg_log_domains, &error)) { fprintf (stderr, "Default config file %s invalid: (%d) %s\n", config, error ? error->code : -1, @@ -552,6 +550,16 @@ main (int argc, char *argv[]) } } + /* Logging setup */ + if (!nm_logging_setup (log_level ? log_level : cfg_log_level, + log_domains ? log_domains : cfg_log_domains, + &error)) { + fprintf (stderr, + _("%s. Please use --help to see a list of valid options.\n"), + error->message); + exit (1); + } + /* Plugins specified with '--plugins' override those of config file */ plugins = plugins ? plugins : g_strdup (conf_plugins); g_free (conf_plugins); @@ -722,6 +730,10 @@ done: g_free (config); g_free (plugins); g_free (dhcp); + g_free (log_level); + g_free (log_domains); + g_free (cfg_log_level); + g_free (cfg_log_domains); nm_log_info (LOGD_CORE, "exiting (%s)", success ? "success" : "error"); exit (success ? 0 : 1); From 6e97fc444120d00da88348b180fdf328d555a160 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:19:30 -0700 Subject: [PATCH 016/105] logging: tweak default log levels --- src/main.c | 2 +- src/nm-logging.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 2b0085abba..d044d0e3b1 100644 --- a/src/main.c +++ b/src/main.c @@ -462,7 +462,7 @@ main (int argc, char *argv[]) { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, - "Log domains separated by ',': any combination of [HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", + "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", "HW,RFKILL,WIFI" }, {NULL} }; diff --git a/src/nm-logging.c b/src/nm-logging.c index a07a5da69b..06a6b1b6f1 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -39,7 +39,7 @@ #include "nm-utils.h" static guint32 log_level = LOGL_INFO; -static guint32 log_domains = LOGD_CORE | LOGD_HW; +static guint32 log_domains = LOGD_CORE | LOGD_HW | LOGD_RFKILL | LOGD_SUSPEND; typedef struct { guint32 num; @@ -55,6 +55,7 @@ static const LogDesc level_descs[] = { }; static const LogDesc domain_descs[] = { + { LOGD_NONE, "NONE" }, { LOGD_HW, "HW" }, { LOGD_RFKILL, "RFKILL" }, { LOGD_ETHER, "ETHER" }, From 28664e80fe7b71d6397c532e0e9a246246ec6cdc Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:20:11 -0700 Subject: [PATCH 017/105] logging: update nm-manager.c logging --- src/nm-manager.c | 133 +++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 68 deletions(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 6c18bc2b6b..bb243e0c64 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2009 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -26,7 +26,7 @@ #include "nm-glib-compat.h" #include "nm-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "nm-vpn-manager.h" #include "nm-modem-manager.h" @@ -341,8 +341,7 @@ modem_added (NMModemManager *modem_manager, * by the Bluetooth code during the connection process. */ if (driver && !strcmp (driver, "bluetooth")) { - g_message ("%s: ignoring modem '%s' (no associated Bluetooth device)", - __func__, ip_iface); + nm_log_info (LOGD_MB, "ignoring modem '%s' (no associated Bluetooth device)", ip_iface); return; } @@ -352,7 +351,7 @@ modem_added (NMModemManager *modem_manager, else if (NM_IS_MODEM_CDMA (modem)) device = nm_device_cdma_new (NM_MODEM_CDMA (modem), driver); else - g_message ("%s: unhandled modem '%s'", __func__, ip_iface); + nm_log_info (LOGD_MB, "unhandled modem '%s'", ip_iface); if (device) add_device (self, device); @@ -488,7 +487,7 @@ aipd_handle_event (DBusGProxy *proxy, gboolean handled = FALSE; if (!event || !iface) { - nm_warning ("Incomplete message received from avahi-autoipd"); + nm_log_warn (LOGD_AUTOIP4, "incomplete message received from avahi-autoipd"); return; } @@ -496,7 +495,7 @@ aipd_handle_event (DBusGProxy *proxy, && (strcmp (event, "CONFLICT") != 0) && (strcmp (event, "UNBIND") != 0) && (strcmp (event, "STOP") != 0)) { - nm_warning ("Unknown event '%s' received from avahi-autoipd", event); + nm_log_warn (LOGD_AUTOIP4, "unknown event '%s' received from avahi-autoipd", event); return; } @@ -511,7 +510,7 @@ aipd_handle_event (DBusGProxy *proxy, } if (!handled) - nm_warning ("Unhandled avahi-autoipd event for '%s'", iface); + nm_log_warn (LOGD_AUTOIP4, "(%s): unhandled avahi-autoipd event", iface); } static const char * @@ -693,7 +692,8 @@ user_connection_get_settings_cb (DBusGProxy *proxy, if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &settings, G_TYPE_INVALID)) { - nm_warning ("Couldn't retrieve connection settings: %s.", err->message); + nm_log_info (LOGD_USER_SET, "couldn't retrieve connection settings: %s.", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto out; } @@ -708,10 +708,9 @@ user_connection_get_settings_cb (DBusGProxy *proxy, connection = nm_connection_new_from_hash (settings, &error); if (connection == NULL) { - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_USER_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); goto out; } @@ -754,7 +753,7 @@ user_connection_get_settings_cb (DBusGProxy *proxy, } } else { // FIXME: merge settings? or just replace? - nm_warning ("%s (#%d): implement merge settings", __func__, __LINE__); + nm_log_dbg (LOGD_USER_SET, "implement merge settings"); } out: @@ -802,10 +801,9 @@ user_connection_updated_cb (DBusGProxy *proxy, new_connection = nm_connection_new_from_hash (settings, &error); if (!new_connection) { /* New connection invalid, remove existing connection */ - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_USER_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); remove_connection (manager, old_connection, priv->user_connections); return; @@ -842,7 +840,7 @@ user_internal_new_connection_cb (DBusGProxy *proxy, path, NM_DBUS_IFACE_SETTINGS_CONNECTION); if (!con_proxy) { - nm_warning ("Error: could not init user connection proxy"); + nm_log_err (LOGD_USER_SET, "could not init user connection proxy"); return; } @@ -888,7 +886,8 @@ user_list_connections_cb (DBusGProxy *proxy, if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &ops, G_TYPE_INVALID)) { - nm_warning ("Couldn't retrieve connections: %s.", err->message); + nm_log_warn (LOGD_USER_SET, "couldn't retrieve connections: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto out; } @@ -934,7 +933,7 @@ user_query_connections (NMManager *manager) NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS); if (!priv->user_proxy) { - nm_warning ("Error: could not init settings proxy"); + nm_log_err (LOGD_USER_SET, "could not init user settings proxy"); return; } @@ -977,16 +976,15 @@ system_connection_updated_cb (NMSettingsConnectionInterface *connection, if (!existing) return; if (existing != connection) { - g_warning ("%s: existing connection didn't matched updated.", __func__); + nm_log_warn (LOGD_SYS_SET, "existing connection didn't matched updated."); return; } if (!nm_connection_verify (NM_CONNECTION (existing), &error)) { /* Updated connection invalid, remove existing connection */ - nm_warning ("%s: Invalid connection: '%s' / '%s' invalid: %d", - __func__, - g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), - error->message, error->code); + nm_log_warn (LOGD_SYS_SET, "invalid connection: '%s' / '%s' invalid: %d", + g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)), + error->message, error->code); g_error_free (error); remove_connection (manager, NM_CONNECTION (existing), priv->system_connections); return; @@ -1228,10 +1226,10 @@ manager_set_radio_enabled (NMManager *manager, "main", rstate->key, G_TYPE_BOOLEAN, (gpointer) &enabled, &error)) { - g_warning ("Writing to state file %s failed: (%d) %s.", - priv->state_file, - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_CORE, "writing to state file %s failed: (%d) %s.", + priv->state_file, + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); } } @@ -1401,9 +1399,9 @@ manager_rfkill_update_one_type (NMManager *self, } if (new_he != rstate->hw_enabled) { - nm_info ("%s now %s by radio killswitch", - rstate->desc, - (new_e && new_he) ? "enabled" : "disabled"); + nm_log_info (LOGD_RFKILL, "%s now %s by radio killswitch", + rstate->desc, + (new_e && new_he) ? "enabled" : "disabled"); rstate->hw_enabled = new_he; g_object_notify (G_OBJECT (self), rstate->hw_prop); @@ -1510,14 +1508,14 @@ add_device (NMManager *self, NMDevice *device) driver = nm_device_get_driver (device); if (!driver) driver = "unknown"; - nm_info ("(%s): new %s device (driver: '%s')", iface, type_desc, driver); + nm_log_info (LOGD_HW, "(%s): new %s device (driver: '%s')", iface, type_desc, driver); path = g_strdup_printf ("/org/freedesktop/NetworkManager/Devices/%d", devcount++); nm_device_set_path (device, path); dbus_g_connection_register_g_object (nm_dbus_manager_get_connection (priv->dbus_mgr), path, G_OBJECT (device)); - nm_info ("(%s): exported as %s", iface, path); + nm_log_info (LOGD_CORE, "(%s): exported as %s", iface, path); g_free (path); /* Check if we should assume the device's active connection by matching its @@ -1557,11 +1555,11 @@ add_device (NMManager *self, NMDevice *device) if (ac_path) g_object_notify (G_OBJECT (self), NM_MANAGER_ACTIVE_CONNECTIONS); else { - nm_warning ("Assumed connection (%d) %s failed to activate: (%d) %s", - nm_connection_get_scope (existing), - nm_connection_get_path (existing), - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_CORE, "assumed connection (%d) %s failed to activate: (%d) %s", + nm_connection_get_scope (existing), + nm_connection_get_path (existing), + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); } } @@ -1710,13 +1708,12 @@ bluez_manager_bdaddr_added_cb (NMBluezManager *bluez_mgr, device = nm_device_bt_new (object_path, bdaddr, name, capabilities, FALSE); if (device) { - g_message ("%s: BT device %s (%s) added (%s%s%s)", - __func__, - name, - bdaddr, - has_dun ? "DUN" : "", - has_dun && has_nap ? " " : "", - has_nap ? "NAP" : ""); + nm_log_info (LOGD_HW, "BT device %s (%s) added (%s%s%s)", + name, + bdaddr, + has_dun ? "DUN" : "", + has_dun && has_nap ? " " : "", + has_nap ? "NAP" : ""); add_device (manager, device); } @@ -1735,7 +1732,7 @@ bluez_manager_bdaddr_removed_cb (NMBluezManager *bluez_mgr, g_return_if_fail (bdaddr != NULL); g_return_if_fail (object_path != NULL); - g_message ("%s: BT device %s removed", __func__, bdaddr); + nm_log_info (LOGD_HW, "BT device %s removed", bdaddr); for (iter = priv->devices; iter; iter = iter->next) { NMDevice *device = NM_DEVICE (iter->data); @@ -2010,7 +2007,7 @@ user_get_secrets (NMManager *self, nm_connection_get_path (connection), NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS); if (!info->proxy) { - nm_warning ("%s: could not create user connection secrets proxy", __func__); + nm_log_warn (LOGD_USER_SET, "could not create user connection secrets proxy"); g_free (info); return NULL; } @@ -2225,8 +2222,8 @@ wait_for_connection_expired (gpointer data) g_set_error (&error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_CONNECTION, "%s", "Connection was not provided by any settings service"); - nm_warning ("Connection (%d) %s failed to activate (timeout): (%d) %s", - info->scope, info->connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate (timeout): (%d) %s", + info->scope, info->connection_path, error->code, error->message); dbus_g_method_return_error (info->context, error); g_error_free (error); @@ -2377,8 +2374,8 @@ connection_added_default_handler (NMManager *manager, g_object_notify (G_OBJECT (manager), NM_MANAGER_ACTIVE_CONNECTIONS); } else { dbus_g_method_return_error (info->context, error); - nm_warning ("Connection (%d) %s failed to activate: (%d) %s", - scope, info->connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate: (%d) %s", + scope, info->connection_path, error->code, error->message); g_error_free (error); } @@ -2561,8 +2558,8 @@ impl_manager_activate_connection (NMManager *manager, err: if (error) { dbus_g_method_return_error (context, error); - nm_warning ("Connection (%d) %s failed to activate: (%d) %s", - scope, connection_path, error->code, error->message); + nm_log_warn (LOGD_CORE, "connection (%d) %s failed to activate: (%d) %s", + scope, connection_path, error->code, error->message); g_error_free (error); } @@ -2656,16 +2653,16 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) "main", "NetworkingEnabled", G_TYPE_BOOLEAN, (gpointer) &networking_enabled, &err)) { - g_warning ("Writing to state file %s failed: (%d) %s.", - priv->state_file, - err ? err->code : -1, - (err && err->message) ? err->message : "unknown"); + nm_log_warn (LOGD_SUSPEND, "writing to state file %s failed: (%d) %s.", + priv->state_file, + err ? err->code : -1, + (err && err->message) ? err->message : "unknown"); } } if (sleep) { - nm_info ("Sleeping..."); + nm_log_info (LOGD_SUSPEND, "sleeping..."); /* Just deactivate and down all devices from the device list, * we'll remove them in 'wake' for speed's sake. @@ -2675,7 +2672,7 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) } else { const GSList *unmanaged_specs; - nm_info ("Waking up..."); + nm_log_info (LOGD_SUSPEND, "waking up..."); unmanaged_specs = nm_sysconfig_settings_get_unmanaged_specs (priv->sys_settings); @@ -2798,7 +2795,7 @@ nm_manager_get_connections (NMManager *manager, else if (scope == NM_CONNECTION_SCOPE_SYSTEM) g_hash_table_foreach (priv->system_connections, connections_to_slist, &list); else - nm_warning ("Unknown NMConnectionScope %d", scope); + nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope); return list; } @@ -2819,7 +2816,7 @@ nm_manager_get_connection_by_object_path (NMManager *manager, else if (scope == NM_CONNECTION_SCOPE_SYSTEM) connection = (NMConnection *) g_hash_table_lookup (priv->system_connections, path); else - nm_warning ("Unknown NMConnectionScope %d", scope); + nm_log_err (LOGD_CORE, "unknown NMConnectionScope %d", scope); return connection; } @@ -2862,10 +2859,10 @@ nm_manager_start (NMManager *self) } rstate->hw_enabled = hw_enabled; - nm_info ("%s %s by radio killswitch; %s by state file", - rstate->desc, - (rstate->hw_enabled && enabled) ? "enabled" : "disabled", - (rstate->enabled) ? "enabled" : "disabled"); + nm_log_info (LOGD_RFKILL, "%s %s by radio killswitch; %s by state file", + rstate->desc, + (rstate->hw_enabled && enabled) ? "enabled" : "disabled", + (rstate->enabled) ? "enabled" : "disabled"); manager_set_radio_enabled (self, rstate, rstate->enabled && enabled); } @@ -3176,7 +3173,7 @@ nm_manager_init (NMManager *manager) manager, NULL); } else - nm_warning ("%s: could not initialize avahi-autoipd D-Bus proxy", __func__); + nm_log_warn (LOGD_AUTOIP4, "could not initialize avahi-autoipd D-Bus proxy"); } static void From 8faf8c91efbaae1b8546cb727a37332f9a85485d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:25:42 -0700 Subject: [PATCH 018/105] logging: add DEVICE logging domain --- src/main.c | 2 +- src/nm-logging.c | 1 + src/nm-logging.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index d044d0e3b1..142c1af1f8 100644 --- a/src/main.c +++ b/src/main.c @@ -462,7 +462,7 @@ main (int argc, char *argv[]) { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, - "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE]", + "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE]", "HW,RFKILL,WIFI" }, {NULL} }; diff --git a/src/nm-logging.c b/src/nm-logging.c index 06a6b1b6f1..fdb6e675d0 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -77,6 +77,7 @@ static const LogDesc domain_descs[] = { { LOGD_SYS_SET, "SYS_SET" }, { LOGD_SUSPEND, "SUSPEND" }, { LOGD_CORE, "CORE" }, + { LOGD_DEVICE, "DEVICE" }, { 0, NULL } }; diff --git a/src/nm-logging.h b/src/nm-logging.h index 8880053143..1b5327812d 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -48,6 +48,7 @@ enum { LOGD_SYS_SET = 0x00040000, LOGD_SUSPEND = 0x00080000, LOGD_CORE = 0x00100000, /* Core daemon and policy stuff */ + LOGD_DEVICE = 0x00200000, /* Device state and activation */ }; /* Log levels */ From a8c61751941c503b60f720ddcc8970fc8192d8d0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:25:54 -0700 Subject: [PATCH 019/105] logging: update nm-udev-manager.c logging --- src/nm-udev-manager.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index 956068de41..b1b49f510f 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -33,7 +33,7 @@ #include "nm-udev-manager.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" #include "nm-device-wifi.h" #include "nm-device-olpc-mesh.h" @@ -139,7 +139,7 @@ sysfs_state_to_nm_state (gint sysfs_state) case 2: return RFKILL_HARD_BLOCKED; default: - g_warning ("%s: Unhandled rfkill state %d", __func__, sysfs_state); + nm_log_warn (LOGD_RFKILL, "unhandled rfkill state %d", sysfs_state); break; } return RFKILL_UNBLOCKED; @@ -229,11 +229,11 @@ add_one_killswitch (NMUdevManager *self, GUdevDevice *device) ks = killswitch_new (device, rtype); priv->killswitches = g_slist_prepend (priv->killswitches, ks); - nm_info ("Found %s radio killswitch %s (at %s) (driver %s)", - str_type, - ks->name, - ks->path, - ks->driver ? ks->driver : ""); + nm_log_info (LOGD_RFKILL, "found %s radio killswitch %s (at %s) (driver %s)", + str_type, + ks->name, + ks->path, + ks->driver ? ks->driver : ""); } static void @@ -265,7 +265,7 @@ rfkill_remove (NMUdevManager *self, Killswitch *ks = iter->data; if (!strcmp (ks->name, name)) { - nm_info ("Radio killswitch %s disappeared", ks->path); + nm_log_info (LOGD_RFKILL, "radio killswitch %s disappeared", ks->path); priv->killswitches = g_slist_remove (priv->killswitches, ks); killswitch_destroy (ks); break; @@ -322,7 +322,7 @@ device_creator (NMUdevManager *manager, path = g_udev_device_get_sysfs_path (udev_device); if (!path) { - nm_warning ("couldn't determine device path; ignoring..."); + nm_log_warn (LOGD_HW, "couldn't determine device path; ignoring..."); return NULL; } @@ -345,13 +345,13 @@ device_creator (NMUdevManager *manager, } if (!driver) { - nm_warning ("%s: couldn't determine device driver; ignoring...", path); + nm_log_warn (LOGD_HW, "%s: couldn't determine device driver; ignoring...", path); goto out; } ifindex = g_udev_device_get_sysfs_attr_as_int (udev_device, "ifindex"); if (ifindex <= 0) { - nm_warning ("%s: device had invalid ifindex %d; ignoring...", path, (guint32) ifindex); + nm_log_warn (LOGD_HW, "%s: device had invalid ifindex %d; ignoring...", path, (guint32) ifindex); goto out; } From dda5a3da407ea39d19a63b33b92f5cc46596fa03 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:32:23 -0700 Subject: [PATCH 020/105] logging: update default log domains --- src/nm-logging.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-logging.c b/src/nm-logging.c index fdb6e675d0..ba5f877448 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -39,7 +39,8 @@ #include "nm-utils.h" static guint32 log_level = LOGL_INFO; -static guint32 log_domains = LOGD_CORE | LOGD_HW | LOGD_RFKILL | LOGD_SUSPEND; +static guint32 log_domains = \ + LOGD_CORE | LOGD_HW | LOGD_RFKILL | LOGD_SUSPEND | LOGD_MB | LOGD_BT; typedef struct { guint32 num; From b7288577fe4249304cc0a77ce4862cf1791b8b59 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:41:12 -0700 Subject: [PATCH 021/105] logging: update modem-manager logging --- src/modem-manager/nm-modem-cdma.c | 16 ++++----- src/modem-manager/nm-modem-gsm.c | 22 ++++++------ src/modem-manager/nm-modem-manager.c | 36 +++++++++---------- src/modem-manager/nm-modem.c | 53 ++++++++++++++-------------- 4 files changed, 64 insertions(+), 63 deletions(-) diff --git a/src/modem-manager/nm-modem-cdma.c b/src/modem-manager/nm-modem-cdma.c index f2a04dc076..c32c18222c 100644 --- a/src/modem-manager/nm-modem-cdma.c +++ b/src/modem-manager/nm-modem-cdma.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. * Copyright (C) 2009 Novell, Inc. */ @@ -28,8 +28,8 @@ #include "nm-dbus-manager.h" #include "nm-setting-connection.h" #include "nm-setting-cdma.h" -#include "nm-utils.h" #include "NetworkManagerUtils.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMModemCdma, nm_modem_cdma, NM_TYPE_MODEM) @@ -119,9 +119,9 @@ stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, TRUE, NM_DEVICE_STATE_REASON_NONE); else { - nm_warning ("CDMA connection failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "CDMA connection failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_NONE); } @@ -150,9 +150,9 @@ stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_da if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) do_connect (self); else { - nm_warning ("CDMA modem enable failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "CDMA modem enable failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); } diff --git a/src/modem-manager/nm-modem-gsm.c b/src/modem-manager/nm-modem-gsm.c index 152b2a6a9c..abb96db1fd 100644 --- a/src/modem-manager/nm-modem-gsm.c +++ b/src/modem-manager/nm-modem-gsm.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. * Copyright (C) 2009 Novell, Inc. */ @@ -26,7 +26,7 @@ #include "nm-setting-connection.h" #include "nm-setting-gsm.h" #include "nm-modem-types.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" typedef enum { @@ -207,9 +207,9 @@ stage1_prepare_done (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data else if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_WRONG)) ask_for_pin (self, TRUE); else { - nm_warning ("GSM connection failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "GSM connection failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (error)); } @@ -260,9 +260,9 @@ stage1_pin_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) /* Success; go back and try the enable again */ do_enable (self); } else { - nm_warning ("GSM PIN unlock failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "GSM PIN unlock failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_error_free (error); g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED); @@ -303,9 +303,9 @@ stage1_enable_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_da if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) do_connect (self); else { - nm_warning ("GSM modem enable failed: (%d) %s", - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "GSM modem enable failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN)) handle_enable_pin_required (self); diff --git a/src/modem-manager/nm-modem-manager.c b/src/modem-manager/nm-modem-manager.c index 6a7de07ef9..28f7b94d0c 100644 --- a/src/modem-manager/nm-modem-manager.c +++ b/src/modem-manager/nm-modem-manager.c @@ -15,18 +15,18 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. * Copyright (C) 2009 Novell, Inc. * Copyright (C) 2009 Canonical Ltd. */ #include #include "nm-modem-manager.h" +#include "nm-logging.h" #include "nm-modem.h" #include "nm-modem-gsm.h" #include "nm-modem-cdma.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" #include "nm-modem-types.h" #include "nm-marshal.h" @@ -95,7 +95,7 @@ get_modem_properties (DBusGConnection *connection, *type = g_value_get_uint (&value); g_value_unset (&value); } else { - g_warning ("Could not get device type: %s", err->message); + nm_log_warn (LOGD_MB, "could not get device type: %s", err->message); goto out; } @@ -108,7 +108,7 @@ get_modem_properties (DBusGConnection *connection, *device = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get device: %s", err->message); + nm_log_warn (LOGD_MB, "could not get device: %s", err->message); goto out; } @@ -121,7 +121,7 @@ get_modem_properties (DBusGConnection *connection, *ip_method = g_value_get_uint (&value); g_value_unset (&value); } else { - g_warning ("Could not get IP method: %s", err->message); + nm_log_warn (LOGD_MB, "could not get IP method: %s", err->message); goto out; } @@ -134,7 +134,7 @@ get_modem_properties (DBusGConnection *connection, *data_device = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get modem data device: %s", err->message); + nm_log_warn (LOGD_MB, "could not get modem data device: %s", err->message); goto out; } @@ -147,7 +147,7 @@ get_modem_properties (DBusGConnection *connection, *driver = g_value_dup_string (&value); g_value_unset (&value); } else { - g_warning ("Could not get modem driver: %s", err->message); + nm_log_warn (LOGD_MB, "could not get modem driver: %s", err->message); goto out; } @@ -164,13 +164,13 @@ static void create_modem (NMModemManager *manager, const char *path) { NMModemManagerPrivate *priv = NM_MODEM_MANAGER_GET_PRIVATE (manager); - NMModem *modem; + NMModem *modem = NULL; char *data_device = NULL, *driver = NULL, *master_device = NULL; uint modem_type = MM_MODEM_TYPE_UNKNOWN; uint ip_method = MM_MODEM_IP_METHOD_PPP; if (g_hash_table_lookup (priv->modems, path)) { - nm_warning ("Modem with path %s already exists, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s already exists, ignoring", path); return; } @@ -180,22 +180,22 @@ create_modem (NMModemManager *manager, const char *path) return; if (modem_type == MM_MODEM_TYPE_UNKNOWN) { - nm_warning ("Modem with path %s has unknown type, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown type, ignoring", path); return; } if (!master_device || !strlen (master_device)) { - nm_warning ("Modem with path %s has unknown device, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown device, ignoring", path); return; } if (!driver || !strlen (driver)) { - nm_warning ("Modem with path %s has unknown driver, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown driver, ignoring", path); return; } if (!data_device || !strlen (data_device)) { - nm_warning ("Modem with path %s has unknown data device, ignoring", path); + nm_log_warn (LOGD_MB, "modem with path %s has unknown data device, ignoring", path); return; } @@ -204,7 +204,7 @@ create_modem (NMModemManager *manager, const char *path) else if (modem_type == MM_MODEM_TYPE_CDMA) modem = nm_modem_cdma_new (path, master_device, data_device, ip_method); else - g_error ("Invalid modem type"); + nm_log_warn (LOGD_MB, "unknown modem type '%d'", modem_type); g_free (data_device); @@ -265,7 +265,7 @@ enumerate_devices_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer dat if (!dbus_g_proxy_end_call (proxy, call_id, &error, dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH), &modems, G_TYPE_INVALID)) { - nm_warning ("Could not get modem list: %s", error->message); + nm_log_warn (LOGD_MB, "could not get modem list: %s", error->message); g_error_free (error); } else { int i; @@ -291,7 +291,7 @@ modem_manager_appeared (NMModemManager *self, gboolean enumerate_devices) priv->poke_id = 0; } - nm_info ("modem-manager is now available"); + nm_log_info (LOGD_MB, "modem-manager is now available"); priv->proxy = dbus_g_proxy_new_for_name (nm_dbus_manager_get_connection (priv->dbus_mgr), MM_DBUS_SERVICE, MM_DBUS_PATH, MM_DBUS_INTERFACE); @@ -331,7 +331,7 @@ modem_manager_disappeared (NMModemManager *self) } /* Try to activate the modem-manager */ - nm_info ("Trying to start the modem-manager..."); + nm_log_info (LOGD_MB, "trying to start the modem manager..."); poke_modem_cb (self); priv->poke_id = g_timeout_add_seconds (MODEM_POKE_INTERVAL, poke_modem_cb, self); } @@ -356,7 +356,7 @@ nm_modem_manager_name_owner_changed (NMDBusManager *dbus_mgr, if (!old_owner_good && new_owner_good) { modem_manager_appeared (NM_MODEM_MANAGER (user_data), FALSE); } else if (old_owner_good && !new_owner_good) { - nm_info ("modem manager disappeared"); + nm_log_info (LOGD_MB, "the modem manager disappeared"); modem_manager_disappeared (NM_MODEM_MANAGER (user_data)); } } diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index 4ce4c9ee48..d9413edf28 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. * Copyright (C) 2009 Novell, Inc. */ @@ -27,7 +27,7 @@ #include "nm-marshal.h" #include "nm-properties-changed-signal.h" #include "nm-modem-types.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" #include "nm-device-private.h" #include "nm-device-interface.h" @@ -203,6 +203,7 @@ ppp_ip4_config (NMPPPManager *ppp_manager, } if (!num || dns_workaround) { + nm_log_warn (LOGD_PPP, "compensating for invalid PPP-provided nameservers"); nm_ip4_config_reset_nameservers (config); nm_ip4_config_add_nameserver (config, good_dns1); nm_ip4_config_add_nameserver (config, good_dns2); @@ -267,8 +268,7 @@ ppp_stage3_ip4_config_start (NMModem *self, ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_warning ("%s: error starting PPP: (%d) %s", - __func__, + nm_log_err (LOGD_PPP, "error starting PPP: (%d) %s", error ? error->code : -1, error && error->message ? error->message : "(unknown)"); g_error_free (error); @@ -398,6 +398,7 @@ nm_modem_stage3_ip4_config_start (NMModem *self, NMDeviceClass *device_class, NMDeviceStateReason *reason) { + NMModemPrivate *priv; NMActRequest *req; NMActStageReturn ret; @@ -412,7 +413,8 @@ nm_modem_stage3_ip4_config_start (NMModem *self, req = nm_device_get_act_request (device); g_assert (req); - switch (NM_MODEM_GET_PRIVATE (self)->ip_method) { + priv = NM_MODEM_GET_PRIVATE (self); + switch (priv->ip_method) { case MM_MODEM_IP_METHOD_PPP: ret = ppp_stage3_ip4_config_start (self, req, reason); break; @@ -423,7 +425,7 @@ nm_modem_stage3_ip4_config_start (NMModem *self, ret = device_class->act_stage3_ip4_config_start (device, reason); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); ret = NM_ACT_STAGE_RETURN_FAILURE; break; } @@ -438,6 +440,7 @@ nm_modem_stage4_get_ip4_config (NMModem *self, NMIP4Config **config, NMDeviceStateReason *reason) { + NMModemPrivate *priv; NMActRequest *req; NMActStageReturn ret; @@ -452,7 +455,8 @@ nm_modem_stage4_get_ip4_config (NMModem *self, req = nm_device_get_act_request (device); g_assert (req); - switch (NM_MODEM_GET_PRIVATE (self)->ip_method) { + priv = NM_MODEM_GET_PRIVATE (self); + switch (priv->ip_method) { case MM_MODEM_IP_METHOD_PPP: ret = ppp_stage4 (self, req, config, reason); break; @@ -463,7 +467,7 @@ nm_modem_stage4_get_ip4_config (NMModem *self, ret = device_class->act_stage4_get_ip4_config (device, config, reason); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); ret = NM_ACT_STAGE_RETURN_FAILURE; break; } @@ -526,7 +530,7 @@ nm_modem_connection_secrets_updated (NMModem *self, if (!strcmp (candidate_setting_name, setting_name)) found = TRUE; else { - nm_warning ("Ignoring updated secrets for setting '%s'.", + nm_log_warn (LOGD_MB, "ignoring updated secrets for setting '%s'.", candidate_setting_name); } } @@ -662,7 +666,7 @@ real_deactivate_quickly (NMModem *self, NMDevice *device) nm_system_device_set_up_down_with_iface (iface, FALSE, NULL); break; default: - g_warning ("Invalid IP method"); + nm_log_err (LOGD_MB, "unknown IP method %d", priv->ip_method); break; } } @@ -679,10 +683,9 @@ disconnect_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { - g_warning ("%s: disconnect failed: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_info (LOGD_MB, "disconnect failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); } } @@ -786,10 +789,9 @@ get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_VALUE, &value, G_TYPE_INVALID)) { - g_warning ("%s: failed get modem enabled state: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "failed get modem enabled state: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); return; } @@ -797,7 +799,7 @@ get_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d NM_MODEM_GET_PRIVATE (self)->mm_enabled = g_value_get_boolean (&value); g_object_notify (G_OBJECT (self), NM_MODEM_ENABLED); } else - g_warning ("%s: failed get modem enabled state: unexpected reply type", __func__); + nm_log_warn (LOGD_MB, "failed get modem enabled state: unexpected reply type"); g_value_unset (&value); } @@ -819,10 +821,9 @@ set_mm_enabled_done (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_d GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { - g_warning ("%s: failed to enable/disable modem: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB, "failed to enable/disable modem: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); } /* Update enabled/disabled state again */ @@ -904,17 +905,17 @@ constructor (GType type, priv = NM_MODEM_GET_PRIVATE (object); if (!priv->device) { - g_warning ("Modem parent device not provided"); + nm_log_err (LOGD_HW, "modem parent device not provided"); goto err; } if (!priv->device) { - g_warning ("Modem command interface not provided"); + nm_log_err (LOGD_HW, "modem command interface not provided"); goto err; } if (!priv->path) { - g_warning ("DBus path not provided"); + nm_log_err (LOGD_HW, "D-Bus path not provided"); goto err; } From 893315ece6b3ee8a2e72d7375b81d51038dd4e28 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:54:24 -0700 Subject: [PATCH 022/105] logging: update VPN manager logging --- src/vpn-manager/nm-vpn-connection.c | 101 +++++++++++++++------------- src/vpn-manager/nm-vpn-manager.c | 1 - src/vpn-manager/nm-vpn-service.c | 59 ++++++++-------- 3 files changed, 85 insertions(+), 76 deletions(-) diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 01bd23c578..01f639acc5 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2009 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -36,6 +36,7 @@ #include "nm-dbus-manager.h" #include "nm-manager.h" #include "nm-system.h" +#include "nm-logging.h" #include "nm-utils.h" #include "nm-vpn-plugin-bindings.h" #include "nm-marshal.h" @@ -269,7 +270,7 @@ plugin_failed (DBusGProxy *proxy, { NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (user_data); - nm_info ("VPN plugin failed: %d", plugin_failure); + nm_log_warn (LOGD_VPN, "VPN plugin failed: %d", plugin_failure); switch (plugin_failure) { case NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED: @@ -291,7 +292,7 @@ plugin_state_changed (DBusGProxy *proxy, NMVPNConnection *connection = NM_VPN_CONNECTION (user_data); NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - nm_info ("VPN plugin state changed: %d", state); + nm_log_info (LOGD_VPN, "VPN plugin state changed: %d", state); if (state == NM_VPN_SERVICE_STATE_STOPPED) { /* Clear connection secrets to ensure secrets get requested each time the @@ -305,7 +306,7 @@ plugin_state_changed (DBusGProxy *proxy, case NM_VPN_CONNECTION_STATE_CONNECT: case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: case NM_VPN_CONNECTION_STATE_ACTIVATED: - nm_info ("VPN plugin state change reason: %d", priv->failure_reason); + nm_log_info (LOGD_VPN, "VPN plugin state change reason: %d", priv->failure_reason); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, priv->failure_reason); @@ -331,8 +332,8 @@ ip_address_to_string (guint32 numeric) if (inet_ntop (AF_INET, &temp_addr, buf, INET_ADDRSTRLEN)) { return buf; } else { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (temp_addr.s_addr)); + nm_log_warn (LOGD_VPN, "error converting IP4 address 0x%X", + ntohl (temp_addr.s_addr)); return NULL; } } @@ -351,38 +352,44 @@ print_vpn_config (NMIP4Config *config, addr = nm_ip4_config_get_address (config, 0); - nm_info ("VPN Gateway: %s", ip_address_to_string (nm_ip4_address_get_gateway (addr))); + nm_log_info (LOGD_VPN, "VPN Gateway: %s", ip_address_to_string (nm_ip4_address_get_gateway (addr))); if (internal_gw) - nm_info ("Internal Gateway: %s", ip_address_to_string (internal_gw)); - nm_info ("Tunnel Device: %s", tundev); - nm_info ("Internal IP4 Address: %s", ip_address_to_string (nm_ip4_address_get_address (addr))); - nm_info ("Internal IP4 Prefix: %d", nm_ip4_address_get_prefix (addr)); - nm_info ("Internal IP4 Point-to-Point Address: %s", - ip_address_to_string (nm_ip4_config_get_ptp_address (config))); - nm_info ("Maximum Segment Size (MSS): %d", nm_ip4_config_get_mss (config)); + nm_log_info (LOGD_VPN, "Internal Gateway: %s", ip_address_to_string (internal_gw)); + nm_log_info (LOGD_VPN, "Tunnel Device: %s", tundev); + nm_log_info (LOGD_VPN, "Internal IP4 Address: %s", ip_address_to_string (nm_ip4_address_get_address (addr))); + nm_log_info (LOGD_VPN, "Internal IP4 Prefix: %d", nm_ip4_address_get_prefix (addr)); + nm_log_info (LOGD_VPN, "Internal IP4 Point-to-Point Address: %s", + ip_address_to_string (nm_ip4_config_get_ptp_address (config))); + nm_log_info (LOGD_VPN, "Maximum Segment Size (MSS): %d", nm_ip4_config_get_mss (config)); num = nm_ip4_config_get_num_routes (config); for (i = 0; i < num; i++) { NMIP4Route *route; route = nm_ip4_config_get_route (config, i); - nm_info ("Static Route: %s/%d Next Hop: %s", - ip_address_to_string (nm_ip4_route_get_dest (route)), - nm_ip4_route_get_prefix (route), - ip_address_to_string (nm_ip4_route_get_next_hop (route))); + nm_log_info (LOGD_VPN, "Static Route: %s/%d Next Hop: %s", + ip_address_to_string (nm_ip4_route_get_dest (route)), + nm_ip4_route_get_prefix (route), + ip_address_to_string (nm_ip4_route_get_next_hop (route))); } num = nm_ip4_config_get_num_nameservers (config); - for (i = 0; i < num; i++) - nm_info ("Internal IP4 DNS: %s", ip_address_to_string (nm_ip4_config_get_nameserver (config, i))); + for (i = 0; i < num; i++) { + nm_log_info (LOGD_VPN, "Internal IP4 DNS: %s", + ip_address_to_string (nm_ip4_config_get_nameserver (config, i))); + } if (nm_ip4_config_get_num_domains (config) > 0) dns_domain = (char *) nm_ip4_config_get_domain (config, 0); - nm_info ("DNS Domain: '%s'", dns_domain ? dns_domain : "(none)"); - nm_info ("Login Banner:"); - nm_info ("-----------------------------------------"); - nm_info ("%s", banner); - nm_info ("-----------------------------------------"); + + nm_log_info (LOGD_VPN, "DNS Domain: '%s'", dns_domain ? dns_domain : "(none)"); + + if (banner && strlen (banner)) { + nm_log_info (LOGD_VPN, "Login Banner:"); + nm_log_info (LOGD_VPN, "-----------------------------------------"); + nm_log_info (LOGD_VPN, "%s", banner); + nm_log_info (LOGD_VPN, "-----------------------------------------"); + } } static void @@ -399,8 +406,8 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, int i; guint32 vpn_ext_gw = 0; - nm_info ("VPN connection '%s' (IP Config Get) reply received.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (IP Config Get) reply received.", + nm_vpn_connection_get_name (connection)); g_source_remove (priv->ipconfig_timeout); priv->ipconfig_timeout = 0; @@ -411,7 +418,7 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, if (val) priv->tundev = g_strdup (g_value_get_string (val)); else { - nm_warning ("%s: invalid or missing tunnel device received!", __func__); + nm_log_err (LOGD_VPN, "invalid or missing tunnel device received!"); goto error; } @@ -445,7 +452,7 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, if (nm_ip4_address_get_address (addr) && nm_ip4_address_get_prefix (addr)) { nm_ip4_config_take_address (config, addr); } else { - nm_warning ("%s: invalid IP4 config received!", __func__); + nm_log_err (LOGD_VPN, "invalid IP4 config received!"); nm_ip4_address_unref (addr); goto error; } @@ -532,8 +539,8 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, priv->ip4_config = config; - nm_info ("VPN connection '%s' (IP Config Get) complete.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (IP Config Get) complete.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_ACTIVATED, NM_VPN_CONNECTION_STATE_REASON_NONE); @@ -541,8 +548,8 @@ nm_vpn_connection_ip4_config_get (DBusGProxy *proxy, } error: - nm_warning ("VPN connection '%s' did not receive valid IP config information.", - nm_vpn_connection_get_name (connection)); + nm_log_warn (LOGD_VPN, "VPN connection '%s' did not receive valid IP config information.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID); @@ -561,8 +568,8 @@ nm_vpn_connection_ip_config_timeout (gpointer user_data) * in this timeout, cancel activation because it's taken too long. */ if (nm_vpn_connection_get_vpn_state (connection) == NM_VPN_CONNECTION_STATE_IP_CONFIG_GET) { - nm_info ("VPN connection '%s' (IP Config Get) timeout exceeded.", - nm_vpn_connection_get_name (connection)); + nm_log_warn (LOGD_VPN, "VPN connection '%s' (IP Config Get) timeout exceeded.", + nm_vpn_connection_get_name (connection)); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT); @@ -577,12 +584,12 @@ nm_vpn_connection_connect_cb (DBusGProxy *proxy, GError *err, gpointer user_data NMVPNConnection *connection = NM_VPN_CONNECTION (user_data); NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (connection); - nm_info ("VPN connection '%s' (Connect) reply received.", - nm_vpn_connection_get_name (connection)); + nm_log_info (LOGD_VPN, "VPN connection '%s' (Connect) reply received.", + nm_vpn_connection_get_name (connection)); if (err) { - nm_warning ("VPN connection '%s' failed to connect: '%s'.", - nm_vpn_connection_get_name (connection), err->message); + nm_log_warn (LOGD_VPN, "VPN connection '%s' failed to connect: '%s'.", + nm_vpn_connection_get_name (connection), err->message); nm_vpn_connection_set_vpn_state (connection, NM_VPN_CONNECTION_STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED); @@ -777,9 +784,9 @@ secrets_update_setting (NMSecretsProviderInterface *interface, return FALSE; if (!nm_connection_update_secrets (priv->connection, NM_SETTING_VPN_SETTING_NAME, new, &error)) { - nm_warning ("Failed to update VPN secrets: %d %s", - error ? error->code : -1, - error && error->message ? error->message : "(none)"); + nm_log_warn (LOGD_VPN, "Failed to update VPN secrets: %d %s", + error ? error->code : -1, + error && error->message ? error->message : "(none)"); g_clear_error (&error); return FALSE; } @@ -823,9 +830,9 @@ connection_need_secrets_cb (DBusGProxy *proxy, NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self); if (error) { - g_warning ("%s.%d: NeedSecrets failed: %s %s", - __FILE__, __LINE__, - g_quark_to_string (error->domain), error->message); + nm_log_err (LOGD_VPN, "NeedSecrets failed: %s %s", + g_quark_to_string (error->domain), + error->message); nm_vpn_connection_fail (self, NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS); return; } @@ -893,7 +900,7 @@ vpn_cleanup (NMVPNConnection *connection) nm_device_get_ip4_config (priv->parent_dev), nm_device_get_priority (priv->parent_dev), NM_IP4_COMPARE_FLAG_ADDRESSES | NM_IP4_COMPARE_FLAG_ROUTES)) { - nm_warning ("%s: failed to re-apply VPN parent device addresses and routes.", __func__); + nm_log_err (LOGD_VPN, "failed to re-apply VPN parent device addresses and routes."); } } } @@ -940,7 +947,7 @@ connection_state_changed (NMVPNConnection *connection, org_freedesktop_NetworkManager_VPN_Plugin_disconnect (priv->proxy, &err); if (err) { - nm_warning ("%s", err->message); + nm_log_warn (LOGD_VPN, "error disconnecting VPN: %s", err->message); g_error_free (err); } diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c index e8fa24c8db..221a8b548c 100644 --- a/src/vpn-manager/nm-vpn-manager.c +++ b/src/vpn-manager/nm-vpn-manager.c @@ -27,7 +27,6 @@ #include "nm-setting-vpn.h" #include "nm-dbus-manager.h" #include "NetworkManagerVPN.h" -#include "nm-utils.h" #include "nm-marshal.h" G_DEFINE_TYPE (NMVPNManager, nm_vpn_manager, G_TYPE_OBJECT) diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c index 15aa56db5e..bdbb3774a0 100644 --- a/src/vpn-manager/nm-vpn-service.c +++ b/src/vpn-manager/nm-vpn-service.c @@ -29,7 +29,7 @@ #include "nm-vpn-service.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-vpn-manager.h" #include "nm-glib-compat.h" @@ -198,18 +198,20 @@ vpn_service_watch_cb (GPid pid, gint status, gpointer user_data) if (WIFEXITED (status)) { guint err = WEXITSTATUS (status); - if (err != 0) - nm_warning ("VPN service '%s' exited with error: %d", - nm_vpn_service_get_name (service), WSTOPSIG (status)); - } else if (WIFSTOPPED (status)) - nm_warning ("VPN service '%s' stopped unexpectedly with signal %d", - nm_vpn_service_get_name (service), WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("VPN service '%s' died with signal %d", - nm_vpn_service_get_name (service), WTERMSIG (status)); - else - nm_warning ("VPN service '%s' died from an unknown cause", - nm_vpn_service_get_name (service)); + if (err != 0) { + nm_log_warn (LOGD_VPN, "VPN service '%s' exited with error: %d", + nm_vpn_service_get_name (service), WSTOPSIG (status)); + } + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_VPN, "VPN service '%s' stopped unexpectedly with signal %d", + nm_vpn_service_get_name (service), WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_VPN, "VPN service '%s' died with signal %d", + nm_vpn_service_get_name (service), WTERMSIG (status)); + } else { + nm_log_warn (LOGD_VPN, "VPN service '%s' died from an unknown cause", + nm_vpn_service_get_name (service)); + } priv->pid = 0; priv->service_child_watch = 0; @@ -222,8 +224,8 @@ nm_vpn_service_timeout (gpointer data) { NMVPNService *service = NM_VPN_SERVICE (data); - nm_info ("VPN service '%s' did not start in time, cancelling connections", - nm_vpn_service_get_name (service)); + nm_log_warn (LOGD_VPN, "VPN service '%s' did not start in time, cancelling connections", + nm_vpn_service_get_name (service)); NM_VPN_SERVICE_GET_PRIVATE (service)->service_start_timeout = 0; nm_vpn_service_connections_stop (service, TRUE, NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT); @@ -250,14 +252,14 @@ nm_vpn_service_daemon_exec (NMVPNService *service, GError **error) nm_vpn_service_child_setup, NULL, &priv->pid, &spawn_error); if (success) { - nm_info ("VPN service '%s' started (%s), PID %d", - nm_vpn_service_get_name (service), priv->dbus_service, priv->pid); + nm_log_info (LOGD_VPN, "VPN service '%s' started (%s), PID %d", + nm_vpn_service_get_name (service), priv->dbus_service, priv->pid); priv->service_child_watch = g_child_watch_add (priv->pid, vpn_service_watch_cb, service); priv->service_start_timeout = g_timeout_add_seconds (5, nm_vpn_service_timeout, service); } else { - nm_warning ("VPN service '%s': could not launch the VPN service. error: (%d) %s.", - nm_vpn_service_get_name (service), spawn_error->code, spawn_error->message); + nm_log_warn (LOGD_VPN, "VPN service '%s': could not launch the VPN service. error: (%d) %s.", + nm_vpn_service_get_name (service), spawn_error->code, spawn_error->message); g_set_error (error, NM_VPN_MANAGER_ERROR, NM_VPN_MANAGER_ERROR_SERVICE_START_FAILED, @@ -334,7 +336,8 @@ nm_vpn_service_activate (NMVPNService *service, // FIXME: fill in error when errors happen nm_vpn_connection_activate (vpn); } else if (priv->service_start_timeout == 0) { - nm_info ("Starting VPN service '%s'...", nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "Starting VPN service '%s'...", + nm_vpn_service_get_name (service)); if (!nm_vpn_service_daemon_exec (service, error)) vpn = NULL; } @@ -378,16 +381,16 @@ nm_vpn_service_name_owner_changed (NMDBusManager *mgr, /* service just appeared */ GSList *iter; - nm_info ("VPN service '%s' just appeared, activating connections", - nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "VPN service '%s' appeared, activating connections", + nm_vpn_service_get_name (service)); for (iter = priv->connections; iter; iter = iter->next) nm_vpn_connection_activate (NM_VPN_CONNECTION (iter->data)); } else if (old_owner_good && !new_owner_good) { /* service went away */ - nm_info ("VPN service '%s' disappeared, cancelling connections", - nm_vpn_service_get_name (service)); + nm_log_info (LOGD_VPN, "VPN service '%s' disappeared, cancelling connections", + nm_vpn_service_get_name (service)); nm_vpn_service_connections_stop (service, TRUE, NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED); } } @@ -415,9 +418,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for vpn service pid %d to exit", pid); + nm_log_dbg (LOGD_VPN, "waiting for VPN service pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("vpn service pid %d cleaned up", pid); + nm_log_dbg (LOGD_VPN, "VPN service pid %d cleaned up", pid); return FALSE; } @@ -446,9 +449,9 @@ finalize (GObject *object) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for vpn service pid %d to exit", priv->pid); + nm_log_dbg (LOGD_VPN, "waiting for VPN service pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("vpn service pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_VPN, "VPN service pid %d cleaned up", priv->pid); } priv->pid = 0; From aa374d711a83599f8300d044fe11eed9f28e10cb Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:55:50 -0700 Subject: [PATCH 023/105] named-manager: whitespace cleanups --- src/named-manager/nm-named-manager.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/named-manager/nm-named-manager.c b/src/named-manager/nm-named-manager.c index 2d4a132b78..1c1b895743 100644 --- a/src/named-manager/nm-named-manager.c +++ b/src/named-manager/nm-named-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2004 - 2005 Colin Walters - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * and others */ @@ -60,9 +60,9 @@ G_DEFINE_TYPE(NMNamedManager, nm_named_manager, G_TYPE_OBJECT) struct NMNamedManagerPrivate { - NMIP4Config * vpn_config; - NMIP4Config * device_config; - GSList * configs; + NMIP4Config *vpn_config; + NMIP4Config *device_config; + GSList *configs; }; @@ -71,11 +71,10 @@ nm_named_manager_get (void) { static NMNamedManager * singleton = NULL; - if (!singleton) { + if (!singleton) singleton = NM_NAMED_MANAGER (g_object_new (NM_TYPE_NAMED_MANAGER, NULL)); - } else { + else g_object_ref (singleton); - } g_assert (singleton); return singleton; From 2c7d63919ab65b2cdf233fd6add8e312db7372ab Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 16:59:31 -0700 Subject: [PATCH 024/105] named-manager: update logging --- src/named-manager/nm-named-manager.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/named-manager/nm-named-manager.c b/src/named-manager/nm-named-manager.c index 1c1b895743..2963652f06 100644 --- a/src/named-manager/nm-named-manager.c +++ b/src/named-manager/nm-named-manager.c @@ -38,7 +38,7 @@ #include "nm-named-manager.h" #include "nm-ip4-config.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-system.h" #include "NetworkManagerUtils.h" @@ -184,7 +184,7 @@ run_netconfig (GError **error, gint *stdin_fd) argv[4] = NULL; tmp = g_strjoinv (" ", argv); - nm_debug ("Spawning '%s'", tmp); + nm_log_debug (LOGD_DNS, "spawning '%s'", tmp); g_free (tmp); if (!g_spawn_async_with_pipes (NULL, argv, NULL, 0, netconfig_child_setup, @@ -201,7 +201,7 @@ write_to_netconfig (gint fd, const char *key, const char *value) int x; str = g_strdup_printf ("%s='%s'\n", key, value); - nm_debug ("Writing to netconfig: %s", str); + nm_log_debug (LOGD_DNS, "writing to netconfig: %s", str); x = write (fd, str, strlen (str)); g_free (str); } @@ -326,7 +326,7 @@ write_resolv_conf (FILE *f, const char *domain, } if (fprintf (f, "%s%s%s", - domain_str ? domain_str : "", + domain_str ? domain_str : "", searches_str ? searches_str : "", nameservers_str ? nameservers_str : "") != -1) retval = TRUE; @@ -355,7 +355,7 @@ dispatch_resolvconf (const char *domain, if (domain || searches || nameservers) { cmd = g_strconcat (RESOLVCONF_PATH, " -a ", "NetworkManager", NULL); - nm_info ("(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "(%s): writing resolv.conf to %s", iface, RESOLVCONF_PATH); if ((f = popen (cmd, "w")) == NULL) g_set_error (error, NM_NAMED_MANAGER_ERROR, @@ -369,7 +369,7 @@ dispatch_resolvconf (const char *domain, } } else { cmd = g_strconcat (RESOLVCONF_PATH, " -d ", "NetworkManager", NULL); - nm_info ("(%s): removing resolv.conf from %s", iface, RESOLVCONF_PATH); + nm_log_info (LOGD_DNS, "(%s): removing resolv.conf from %s", iface, RESOLVCONF_PATH); if (nm_spawn_process (cmd) == 0) retval = TRUE; } @@ -586,7 +586,7 @@ nm_named_manager_add_ip4_config (NMNamedManager *mgr, priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); g_error_free (error); } @@ -622,7 +622,7 @@ nm_named_manager_remove_ip4_config (NMNamedManager *mgr, g_object_unref (config); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); if (error) g_error_free (error); } @@ -652,7 +652,7 @@ nm_named_manager_add_ip6_config (NMNamedManager *mgr, priv->configs = g_slist_append (priv->configs, g_object_ref (config)); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); g_error_free (error); } @@ -682,7 +682,7 @@ nm_named_manager_remove_ip6_config (NMNamedManager *mgr, g_object_unref (config); if (!rewrite_resolv_conf (mgr, iface, &error)) { - nm_warning ("Could not commit DNS changes. Error: '%s'", error ? error->message : "(none)"); + nm_log_warn (LOGD_DNS, "could not commit DNS changes: '%s'", error ? error->message : "(none)"); if (error) g_error_free (error); } From a07968179efb0f21455062f8c06ffd28cf82f3f2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 17:00:16 -0700 Subject: [PATCH 025/105] ppp: plugin doesn't need to #include --- src/ppp-manager/nm-pppd-plugin.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ppp-manager/nm-pppd-plugin.c b/src/ppp-manager/nm-pppd-plugin.c index b98ec2800f..c64bb87f63 100644 --- a/src/ppp-manager/nm-pppd-plugin.c +++ b/src/ppp-manager/nm-pppd-plugin.c @@ -34,7 +34,6 @@ #include "nm-pppd-plugin.h" #include "nm-ppp-status.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" int plugin_init (void); From 4ff8f21e4c28368927cda094404fe8fd454f903e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 17:13:45 -0700 Subject: [PATCH 026/105] ppp: update logging --- src/ppp-manager/nm-ppp-manager.c | 72 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index d3c9f6e94b..de905b49db 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -49,7 +49,7 @@ #include "nm-setting-gsm.h" #include "nm-setting-cdma.h" #include "nm-dbus-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" static void impl_ppp_manager_need_secrets (NMPPPManager *manager, @@ -296,12 +296,13 @@ monitor_cb (gpointer user_data) req.stats_ptr = (caddr_t) &req.stats; strncpy (req.ifr__name, priv->ip_iface, sizeof (req.ifr__name)); - if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) - nm_warning ("Could not read ppp stats: %s", strerror (errno)); - else + if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) { + nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); + } else { g_signal_emit (manager, signals[STATS], 0, - req.stats.p.ppp_ibytes, - req.stats.p.ppp_obytes); + req.stats.p.ppp_ibytes, + req.stats.p.ppp_obytes); + } return TRUE; } @@ -315,7 +316,7 @@ monitor_stats (NMPPPManager *manager) if (priv->monitor_fd > 0) priv->monitor_id = g_timeout_add_seconds (5, monitor_cb, manager); else - nm_warning ("Could not open pppd monitor: %s", strerror (errno)); + nm_log_warn (LOGD_PPP, "could not monitor PPP stats: %s", strerror (errno)); } /*******************************************/ @@ -387,8 +388,8 @@ impl_ppp_manager_need_secrets (NMPPPManager *manager, GError *err = NULL; g_set_error (&err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN, - "Missing type-specific setting; no secrets could be found."); - nm_warning ("%s", err->message); + "Missing type-specific setting; no secrets could be found."); + nm_log_warn (LOGD_PPP, "%s", err->message); dbus_g_method_return_error (context, err); } return; @@ -442,7 +443,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, GValue *val; int i; - nm_info ("PPP manager(IP Config Get) reply received."); + nm_log_info (LOGD_PPP, "PPP manager(IP Config Get) reply received."); remove_timeout_handler (manager); @@ -467,7 +468,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, if (nm_ip4_address_get_address (addr) && nm_ip4_address_get_prefix (addr)) { nm_ip4_config_take_address (config, addr); } else { - nm_warning ("%s: invalid IPv4 address received!", __func__); + nm_log_err (LOGD_PPP, "invalid IPv4 address received!"); nm_ip4_address_unref (addr); goto out; } @@ -490,7 +491,7 @@ impl_ppp_manager_set_ip4_config (NMPPPManager *manager, val = (GValue *) g_hash_table_lookup (config_hash, NM_PPP_IP4_CONFIG_INTERFACE); if (!val || !G_VALUE_HOLDS_STRING (val)) { - nm_warning ("No interface"); + nm_log_err (LOGD_PPP, "no interface received!"); goto out; } priv->ip_iface = g_value_dup_string (val); @@ -582,13 +583,12 @@ nm_cmd_line_add_int (NMCmdLine *cmd, int i) static inline const char * nm_find_pppd (void) { - static const char *pppd_binary_paths[] = - { - "/usr/local/sbin/pppd", - "/usr/sbin/pppd", - "/sbin/pppd", - NULL - }; + static const char *pppd_binary_paths[] = { + "/usr/local/sbin/pppd", + "/usr/sbin/pppd", + "/sbin/pppd", + NULL + }; const char **pppd_binary = pppd_binary_paths; @@ -670,7 +670,7 @@ ppp_exit_code (guint pppd_exit_status, GPid pid) msg = "Unknown error"; } - nm_warning ("ppp pid %d exited with error: %s", pid, msg); + nm_log_warn (LOGD_PPP, "pppd pid %d exited with error: %s", pid, msg); } static void @@ -686,14 +686,14 @@ ppp_watch_cb (GPid pid, gint status, gpointer user_data) err = WEXITSTATUS (status); if (err != 0) ppp_exit_code (err, priv->pid); - } else if (WIFSTOPPED (status)) - nm_warning ("ppp pid %d stopped unexpectedly with signal %d", priv->pid, WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("ppp pid %d died with signal %d", priv->pid, WTERMSIG (status)); - else - nm_warning ("ppp pid %d died from an unknown cause", priv->pid); + } else if (WIFSTOPPED (status)) { + nm_log_info (LOGD_PPP, "pppd pid %d stopped unexpectedly with signal %d", priv->pid, WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_info (LOGD_PPP, "pppd pid %d died with signal %d", priv->pid, WTERMSIG (status)); + } else + nm_log_info (LOGD_PPP, "pppd pid %d died from an unknown cause", priv->pid); - nm_debug ("ppp pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", priv->pid); priv->pid = 0; g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); } @@ -703,7 +703,7 @@ pppd_timed_out (gpointer data) { NMPPPManager *manager = NM_PPP_MANAGER (data); - nm_warning ("Looks like pppd didn't initialize our dbus module"); + nm_log_warn (LOGD_PPP, "pppd timed out or didn't initialize our dbus module"); nm_ppp_manager_stop (manager); g_signal_emit (manager, signals[STATE_CHANGED], 0, NM_PPP_STATUS_DEAD); @@ -913,10 +913,10 @@ nm_ppp_manager_start (NMPPPManager *manager, priv = NM_PPP_MANAGER_GET_PRIVATE (manager); - nm_info ("Starting pppd connection"); + nm_log_info (LOGD_PPP, "starting PPP connection"); cmd_str = nm_cmd_line_to_str (ppp_cmd); - nm_debug ("Command line: %s", cmd_str); + nm_log_dbg (LOGD_PPP, "command line: %s", cmd_str); g_free (cmd_str); priv->pid = 0; @@ -927,7 +927,7 @@ nm_ppp_manager_start (NMPPPManager *manager, goto out; } - nm_debug ("ppp started with pid %d", priv->pid); + nm_log_info (LOGD_PPP, "pppd started with pid %d", priv->pid); priv->ppp_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) ppp_watch_cb, manager); priv->ppp_timeout_handler = g_timeout_add_seconds (timeout_secs, pppd_timed_out, manager); @@ -965,7 +965,7 @@ nm_ppp_manager_update_secrets (NMPPPManager *manager, GError *err = NULL; g_set_error (&err, NM_PPP_MANAGER_ERROR, NM_PPP_MANAGER_ERROR_UNKOWN, "%s", error_message); - nm_warning ("%s", error_message); + nm_log_warn (LOGD_PPP, "%s", error_message); dbus_g_method_return_error (priv->pending_secrets_context, err); g_error_free (err); } else { @@ -989,9 +989,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", pid); + nm_log_dbg (LOGD_PPP, "waiting for pppd pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", pid); return FALSE; } @@ -1034,9 +1034,9 @@ nm_ppp_manager_stop (NMPPPManager *manager) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", priv->pid); + nm_log_dbg (LOGD_PPP, "waiting for pppd pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_PPP, "pppd pid %d cleaned up", priv->pid); } priv->pid = 0; From 3d6108f2451277a15a4f497eb1cbfc3f988d5ea8 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 17:16:45 -0700 Subject: [PATCH 027/105] bt-manager: update logging --- src/bluez-manager/nm-bluez-adapter.c | 12 ++++++------ src/bluez-manager/nm-bluez-device.c | 12 ++++++------ src/bluez-manager/nm-bluez-manager.c | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bluez-manager/nm-bluez-adapter.c b/src/bluez-manager/nm-bluez-adapter.c index ba8f7114f2..27a85e78eb 100644 --- a/src/bluez-manager/nm-bluez-adapter.c +++ b/src/bluez-manager/nm-bluez-adapter.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -27,7 +27,7 @@ #include "nm-bluez-device.h" #include "nm-bluez-common.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMBluezAdapter, nm_bluez_adapter, G_TYPE_OBJECT) @@ -175,8 +175,8 @@ get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &properties, G_TYPE_INVALID)) { - nm_warning ("bluez error getting adapter properties: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting adapter properties: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); goto done; } @@ -209,8 +209,8 @@ query_properties (NMBluezAdapter *self) self, NULL, G_TYPE_INVALID); if (!call) { - nm_warning ("failed to request Bluetooth adapter properties for %s.", - priv->path); + nm_log_warn (LOGD_BT, "failed to request Bluetooth adapter properties for %s.", + priv->path); } } diff --git a/src/bluez-manager/nm-bluez-device.c b/src/bluez-manager/nm-bluez-device.c index 6ecd6b43c0..72acaa6906 100644 --- a/src/bluez-manager/nm-bluez-device.c +++ b/src/bluez-manager/nm-bluez-device.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -26,7 +26,7 @@ #include "nm-bluez-device.h" #include "nm-bluez-common.h" #include "nm-dbus-glib-types.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" @@ -228,8 +228,8 @@ get_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &properties, G_TYPE_INVALID)) { - nm_warning ("bluez error getting device properties: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting device properties: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); g_signal_emit (self, signals[INITIALIZED], 0, FALSE); return; @@ -270,8 +270,8 @@ query_properties (NMBluezDevice *self) self, NULL, G_TYPE_INVALID); if (!call) { - nm_warning ("failed to request Bluetooth device properties for %s.", - priv->path); + nm_log_warn (LOGD_BT, "failed to request Bluetooth device properties for %s.", + priv->path); } } diff --git a/src/bluez-manager/nm-bluez-manager.c b/src/bluez-manager/nm-bluez-manager.c index 96cb3e725e..fe027c4ff5 100644 --- a/src/bluez-manager/nm-bluez-manager.c +++ b/src/bluez-manager/nm-bluez-manager.c @@ -16,7 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -24,7 +24,7 @@ #include #include -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-glib-types.h" #include "nm-marshal.h" #include "nm-bluez-manager.h" @@ -181,8 +181,8 @@ default_adapter_cb (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call, &err, DBUS_TYPE_G_OBJECT_PATH, &default_adapter, G_TYPE_INVALID)) { - nm_warning ("bluez error getting default adapter: %s", - err && err->message ? err->message : "(unknown)"); + nm_log_warn (LOGD_BT, "bluez error getting default adapter: %s", + err && err->message ? err->message : "(unknown)"); g_error_free (err); return; } @@ -201,7 +201,7 @@ query_default_adapter (NMBluezManager *self) self, NULL, G_TYPE_INVALID); if (!call) - nm_warning ("failed to request default Bluetooth adapter."); + nm_log_warn (LOGD_BT, "failed to request default Bluetooth adapter."); } static void From a00a6e5d876412a1cc6e22bddf1200193b6f90ce Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 17:39:57 -0700 Subject: [PATCH 028/105] logging: move logging into its own subdir Some stuff we build (the DHCP manager) gets built independently so that we can use it for unit tests. For that, we need to build the logging bits separately too, since the independent DHCP library can't use them if they are embedded in NM. --- configure.ac | 1 + src/Makefile.am | 5 +++-- src/bluez-manager/Makefile.am | 2 ++ src/logging/Makefile.am | 14 ++++++++++++++ src/{ => logging}/nm-logging.c | 1 - src/{ => logging}/nm-logging.h | 11 +++++++++++ src/modem-manager/Makefile.am | 2 ++ src/named-manager/Makefile.am | 12 ++++++++++-- src/ppp-manager/Makefile.am | 2 ++ src/vpn-manager/Makefile.am | 2 ++ 10 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 src/logging/Makefile.am rename src/{ => logging}/nm-logging.c (99%) rename src/{ => logging}/nm-logging.h (91%) diff --git a/configure.ac b/configure.ac index f5872c1b0c..aedc8ec903 100644 --- a/configure.ac +++ b/configure.ac @@ -440,6 +440,7 @@ include/Makefile src/Makefile src/tests/Makefile marshallers/Makefile +src/logging/Makefile src/named-manager/Makefile src/vpn-manager/Makefile src/dhcp-manager/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index f2a791c6ca..214f7545c3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS= \ + logging \ named-manager \ vpn-manager \ dhcp-manager \ @@ -16,6 +17,7 @@ SUBDIRS= \ INCLUDES = -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/named-manager \ -I${top_srcdir}/src/vpn-manager \ -I${top_srcdir}/src/dhcp-manager \ @@ -125,8 +127,6 @@ NetworkManager_SOURCES = \ NetworkManagerUtils.h \ nm-system.c \ nm-system.h \ - nm-logging.c \ - nm-logging.h \ nm-manager.c \ nm-manager.h \ nm-netlink-monitor.c \ @@ -224,6 +224,7 @@ NetworkManager_CPPFLAGS = \ NetworkManager_LDADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + ./logging/libnm-logging.la \ ./named-manager/libnamed-manager.la \ ./vpn-manager/libvpn-manager.la \ ./dhcp-manager/libdhcp-manager.la \ diff --git a/src/bluez-manager/Makefile.am b/src/bluez-manager/Makefile.am index a96cbe8910..6c199e8ca7 100644 --- a/src/bluez-manager/Makefile.am +++ b/src/bluez-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_builddir}/marshallers \ -I$(top_srcdir)/src/nm-bluez-manager @@ -30,6 +31,7 @@ libbluez_manager_la_CPPFLAGS = \ libbluez_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ $(BLUEZ_LIBS) diff --git a/src/logging/Makefile.am b/src/logging/Makefile.am new file mode 100644 index 0000000000..d2e3e25112 --- /dev/null +++ b/src/logging/Makefile.am @@ -0,0 +1,14 @@ +noinst_LTLIBRARIES = libnm-logging.la + +libnm_logging_la_SOURCES = \ + nm-logging.c \ + nm-logging.h + +libnm_logging_la_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DG_DISABLE_DEPRECATED + +libnm_logging_la_LIBADD = \ + $(GLIB_LIBS) + diff --git a/src/nm-logging.c b/src/logging/nm-logging.c similarity index 99% rename from src/nm-logging.c rename to src/logging/nm-logging.c index ba5f877448..3d8e99b3df 100644 --- a/src/nm-logging.c +++ b/src/logging/nm-logging.c @@ -36,7 +36,6 @@ #include #include "nm-logging.h" -#include "nm-utils.h" static guint32 log_level = LOGL_INFO; static guint32 log_domains = \ diff --git a/src/nm-logging.h b/src/logging/nm-logging.h similarity index 91% rename from src/nm-logging.h rename to src/logging/nm-logging.h index 1b5327812d..086d74b92e 100644 --- a/src/nm-logging.h +++ b/src/logging/nm-logging.h @@ -78,6 +78,17 @@ void _nm_log (const char *func, const char *loc, guint32 domain, guint32 level, const char *fmt, ...); +/* Undefine the nm-utils.h logging stuff to ensure errors */ +#undef nm_print_backtrace +#undef nm_get_timestamp +#undef nm_info +#undef nm_info_str +#undef nm_debug +#undef nm_debug_str +#undef nm_warning +#undef nm_warning_str +#undef nm_error +#undef nm_error_str gboolean nm_logging_setup (const char *level, const char *domains, GError **error); void nm_logging_start (gboolean become_daemon); diff --git a/src/modem-manager/Makefile.am b/src/modem-manager/Makefile.am index 932a041c0d..a0f65c1bae 100644 --- a/src/modem-manager/Makefile.am +++ b/src/modem-manager/Makefile.am @@ -1,5 +1,6 @@ INCLUDES = \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/marshallers @@ -22,6 +23,7 @@ libmodem_manager_la_CPPFLAGS = \ libmodem_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) nm-serial-device-glue.h: $(top_srcdir)/introspection/nm-device-serial.xml diff --git a/src/named-manager/Makefile.am b/src/named-manager/Makefile.am index fe1ec918d5..a33f7d50a9 100644 --- a/src/named-manager/Makefile.am +++ b/src/named-manager/Makefile.am @@ -1,4 +1,8 @@ -INCLUDES = -I${top_srcdir}/libnm-util -I${top_srcdir}/src -I${top_srcdir}/include +INCLUDES = \ + -I${top_srcdir}/src/logging \ + -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src \ + -I${top_srcdir}/include noinst_LTLIBRARIES = libnamed-manager.la @@ -10,4 +14,8 @@ libnamed_manager_la_CPPFLAGS = \ -DNM_PKGDATADIR=\"$(pkgdatadir)\" \ -DNM_LOCALSTATEDIR=\"$(localstatedir)\" -libnamed_manager_la_LIBADD = $(DBUS_LIBS) $(GLIB_LIBS) +libnamed_manager_la_LIBADD = \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + diff --git a/src/ppp-manager/Makefile.am b/src/ppp-manager/Makefile.am index 41cb537c25..2dc7ad94c6 100644 --- a/src/ppp-manager/Makefile.am +++ b/src/ppp-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_builddir}/marshallers noinst_LTLIBRARIES = libppp-manager.la @@ -28,6 +29,7 @@ libppp_manager_la_CPPFLAGS = \ libppp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/vpn-manager/Makefile.am b/src/vpn-manager/Makefile.am index 1078603382..56e4a4ced3 100644 --- a/src/vpn-manager/Makefile.am +++ b/src/vpn-manager/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_builddir}/marshallers \ -I${top_srcdir}/src/named-manager \ @@ -25,6 +26,7 @@ libvpn_manager_la_CPPFLAGS = \ libvpn_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(top_builddir)/libnm-util/libnm-util.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) From ecbb8af10ad3a7d53bf947aff21ba379e8a99a65 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 18:06:36 -0700 Subject: [PATCH 029/105] logging: add DHCP meta-domain --- src/logging/nm-logging.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index 086d74b92e..6511289e21 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -51,6 +51,8 @@ enum { LOGD_DEVICE = 0x00200000, /* Device state and activation */ }; +#define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6) + /* Log levels */ enum { LOGL_ERR = 0x00000000, From 75e789399cc59f3f9473d62713b61e6a117fbe88 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Apr 2010 18:06:47 -0700 Subject: [PATCH 030/105] dhcp: update logging --- src/dhcp-manager/Makefile.am | 2 + src/dhcp-manager/nm-dhcp-client.c | 119 +++++++++++++++------------- src/dhcp-manager/nm-dhcp-dhclient.c | 64 ++++++++------- src/dhcp-manager/nm-dhcp-dhcpcd.c | 23 +++--- src/dhcp-manager/nm-dhcp-manager.c | 26 +++--- 5 files changed, 127 insertions(+), 107 deletions(-) diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am index ff9041c390..f75e6b3d07 100644 --- a/src/dhcp-manager/Makefile.am +++ b/src/dhcp-manager/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = \ -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/src \ -I${top_srcdir}/src/named-manager @@ -32,6 +33,7 @@ libdhcp_manager_la_CPPFLAGS = \ libdhcp_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 41b4301197..888e7c5402 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -29,6 +29,7 @@ #include #include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-glib-types.h" #include "nm-dhcp-client.h" @@ -159,14 +160,14 @@ stop_process (GPid pid, const char *iface) if (i <= 0) { if (iface) { - g_warning ("%s: dhcp client pid %d didn't exit, will kill it.", - iface, pid); + nm_log_warn (LOGD_DHCP, "(%s): DHCP client pid %d didn't exit, will kill it.", + iface, pid); } kill (pid, SIGKILL); - g_warning ("waiting for dhcp client pid %d to exit", pid); + nm_log_dbg (LOGD_DHCP, "waiting for DHCP client pid %d to exit", pid); waitpid (pid, NULL, 0); - g_warning ("dhcp client pid %d cleaned up", pid); + nm_log_dbg (LOGD_DHCP, "DHCP client pid %d cleaned up", pid); } } @@ -193,8 +194,11 @@ daemon_timeout (gpointer user_data) NMDHCPClient *self = NM_DHCP_CLIENT (user_data); NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); - g_message ("(%s): DHCPv%c request timed out.", - priv->iface, priv->ipv6 ? '6' : '4'); + if (priv->ipv6) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCPv6 request timed out.", priv->iface); + } else { + nm_log_warn (LOGD_DHCP4, "(%s): DHCPv4 request timed out.", priv->iface); + } g_signal_emit (G_OBJECT (self), signals[TIMEOUT], 0); return FALSE; } @@ -207,7 +211,7 @@ daemon_watch_cb (GPid pid, gint status, gpointer user_data) if (!WIFEXITED (status)) { priv->state = DHC_ABEND; - g_warning ("dhcp client died abnormally"); + nm_log_warn (LOGD_DHCP, "DHCP client died abnormally"); } priv->pid = 0; @@ -248,8 +252,8 @@ nm_dhcp_client_start_ip4 (NMDHCPClient *self, g_return_val_if_fail (priv->ipv6 == FALSE, FALSE); g_return_val_if_fail (priv->uuid != NULL, FALSE); - g_message ("Activation (%s) Beginning DHCPv4 transaction (timeout in %d seconds)", - priv->iface, priv->timeout); + nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv4 transaction (timeout in %d seconds)", + priv->iface, priv->timeout); priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip4_start (self, s_ip4, dhcp_anycast_addr); if (priv->pid) @@ -274,8 +278,8 @@ nm_dhcp_client_start_ip6 (NMDHCPClient *self, g_return_val_if_fail (priv->ipv6 == TRUE, FALSE); g_return_val_if_fail (priv->uuid != NULL, FALSE); - g_message ("Activation (%s) Beginning DHCPv6 transaction (timeout in %d seconds)", - priv->iface, priv->timeout); + nm_log_info (LOGD_DHCP, "Activation (%s) Beginning DHCPv6 transaction (timeout in %d seconds)", + priv->iface, priv->timeout); priv->pid = NM_DHCP_CLIENT_GET_CLASS (self)->ip6_start (self, s_ip6, dhcp_anycast_addr, info_only); if (priv->pid > 0) @@ -333,9 +337,8 @@ nm_dhcp_client_stop (NMDHCPClient *self) if (priv->pid > 0) { NM_DHCP_CLIENT_GET_CLASS (self)->stop (self); - g_message ("(%s): canceled DHCP transaction, dhcp client pid %d", - priv->iface, - priv->pid); + nm_log_info (LOGD_DHCP, "(%s): canceled DHCP transaction, DHCP client pid %d", + priv->iface, priv->pid); } /* And clean stuff up */ @@ -452,7 +455,7 @@ garray_to_string (GArray *array, const char *key) converted = str->str; if (!g_utf8_validate (converted, -1, NULL)) - g_warning ("%s: DHCP option '%s' couldn't be converted to UTF-8", __func__, key); + nm_log_warn (LOGD_DHCP, "DHCP option '%s' couldn't be converted to UTF-8", key); g_string_free (str, FALSE); return converted; } @@ -467,9 +470,9 @@ copy_option (gpointer key, char *str_value = NULL; if (G_VALUE_TYPE (value) != DBUS_TYPE_G_UCHAR_ARRAY) { - g_warning ("Unexpected key %s value type was not " - "DBUS_TYPE_G_UCHAR_ARRAY", - str_key); + nm_log_warn (LOGD_DHCP, "unexpected key %s value type was not " + "DBUS_TYPE_G_UCHAR_ARRAY", + str_key); return; } @@ -510,11 +513,17 @@ nm_dhcp_client_new_options (NMDHCPClient *self, } priv->state = new_state; - g_message ("DHCPv%c: device %s state changed %s -> %s", - priv->ipv6 ? '6' : '4', - priv->iface, - state_to_string (old_state), - state_to_string (priv->state)); + if (priv->ipv6) { + nm_log_info (LOGD_DHCP6, "(%s): DHCPv6 state changed %s -> %s", + priv->iface, + state_to_string (old_state), + state_to_string (priv->state)); + } else { + nm_log_info (LOGD_DHCP4, "(%s): DHCPv4 state changed %s -> %s", + priv->iface, + state_to_string (old_state), + state_to_string (priv->state)); + } g_signal_emit (G_OBJECT (self), signals[STATE_CHANGED], @@ -575,7 +584,11 @@ nm_dhcp_client_foreach_option (NMDHCPClient *self, priv = NM_DHCP_CLIENT_GET_PRIVATE (self); if (!state_is_bound (priv->state)) { - g_warning ("%s: dhclient didn't bind to a lease.", priv->iface); + if (priv->ipv6) { + nm_log_warn (LOGD_DHCP6, "(%s): DHCPv6 client didn't bind to a lease.", priv->iface); + } else { + nm_log_warn (LOGD_DHCP4, "(%s): DHCPv4 client didn't bind to a lease.", priv->iface); + } return FALSE; } @@ -599,7 +612,7 @@ process_classful_routes (GHashTable *options, NMIP4Config *ip4_config) searches = g_strsplit (str, " ", 0); if ((g_strv_length (searches) % 2)) { - g_message (" static routes provided, but invalid"); + nm_log_info (LOGD_DHCP, " static routes provided, but invalid"); goto out; } @@ -609,11 +622,11 @@ process_classful_routes (GHashTable *options, NMIP4Config *ip4_config) struct in_addr rt_route; if (inet_pton (AF_INET, *s, &rt_addr) <= 0) { - g_warning ("DHCP provided invalid static route address: '%s'", *s); + nm_log_warn (LOGD_DHCP, "DHCP provided invalid static route address: '%s'", *s); continue; } if (inet_pton (AF_INET, *(s + 1), &rt_route) <= 0) { - g_warning ("DHCP provided invalid static route gateway: '%s'", *(s + 1)); + nm_log_warn (LOGD_DHCP, "DHCP provided invalid static route gateway: '%s'", *(s + 1)); continue; } @@ -625,7 +638,7 @@ process_classful_routes (GHashTable *options, NMIP4Config *ip4_config) nm_ip4_route_set_next_hop (route, (guint32) rt_route.s_addr); nm_ip4_config_take_route (ip4_config, route); - g_message (" static route %s gw %s", *s, *(s + 1)); + nm_log_info (LOGD_DHCP, " static route %s gw %s", *s, *(s + 1)); } out: @@ -654,14 +667,14 @@ process_domain_search (const char *str, GFunc add_func, gpointer user_data) } while (*p++); if (strchr (unescaped, '\\')) { - g_message (" invalid domain search: '%s'", unescaped); + nm_log_warn (LOGD_DHCP, " invalid domain search: '%s'", unescaped); goto out; } searches = g_strsplit (unescaped, " ", 0); for (s = searches; *s; s++) { if (strlen (*s)) { - g_message (" domain search '%s'", *s); + nm_log_info (LOGD_DHCP, " domain search '%s'", *s); add_func (*s, user_data); } } @@ -697,31 +710,31 @@ ip4_options_to_config (NMDHCPClient *self) ip4_config = nm_ip4_config_new (); if (!ip4_config) { - g_warning ("%s: couldn't allocate memory for an IP4Config!", priv->iface); + nm_log_warn (LOGD_DHCP4, "(%s): couldn't allocate memory for an IP4Config!", priv->iface); return NULL; } addr = nm_ip4_address_new (); if (!addr) { - g_warning ("%s: couldn't allocate memory for an IP4 Address!", priv->iface); + nm_log_warn (LOGD_DHCP4, "(%s): couldn't allocate memory for an IP4 Address!", priv->iface); goto error; } str = g_hash_table_lookup (priv->options, "new_ip_address"); if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { nm_ip4_address_set_address (addr, tmp_addr.s_addr); - g_message (" address %s", str); + nm_log_info (LOGD_DHCP4, " address %s", str); } else goto error; str = g_hash_table_lookup (priv->options, "new_subnet_mask"); if (str && (inet_pton (AF_INET, str, &tmp_addr) > 0)) { prefix = nm_utils_ip4_netmask_to_prefix (tmp_addr.s_addr); - g_message (" prefix %d (%s)", prefix, str); + nm_log_info (LOGD_DHCP4, " prefix %d (%s)", prefix, str); } else { /* Get default netmask for the IP according to appropriate class. */ prefix = nm_utils_ip4_get_default_prefix (nm_ip4_address_get_address (addr)); - g_message (" prefix %d (default)", prefix); + nm_log_info (LOGD_DHCP4, " prefix %d (default)", prefix); } nm_ip4_address_set_prefix (addr, prefix); @@ -744,7 +757,7 @@ ip4_options_to_config (NMDHCPClient *self) char buf[INET_ADDRSTRLEN + 1]; inet_ntop (AF_INET, &gwaddr, buf, sizeof (buf)); - g_message (" gateway %s", buf); + nm_log_info (LOGD_DHCP4, " gateway %s", buf); nm_ip4_address_set_gateway (addr, gwaddr); } else { /* If the gateway wasn't provided as a classless static route with a @@ -759,10 +772,10 @@ ip4_options_to_config (NMDHCPClient *self) /* FIXME: how to handle multiple routers? */ if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { nm_ip4_address_set_gateway (addr, tmp_addr.s_addr); - g_message (" gateway %s", *s); + nm_log_info (LOGD_DHCP4, " gateway %s", *s); break; } else - g_warning ("Ignoring invalid gateway '%s'", *s); + nm_log_warn (LOGD_DHCP4, "ignoring invalid gateway '%s'", *s); } g_strfreev (routers); } @@ -773,7 +786,7 @@ ip4_options_to_config (NMDHCPClient *self) str = g_hash_table_lookup (priv->options, "new_host_name"); if (str) - g_message (" hostname '%s'", str); + nm_log_info (LOGD_DHCP4, " hostname '%s'", str); str = g_hash_table_lookup (priv->options, "new_domain_name_servers"); if (str) { @@ -783,9 +796,9 @@ ip4_options_to_config (NMDHCPClient *self) for (s = searches; *s; s++) { if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { nm_ip4_config_add_nameserver (ip4_config, tmp_addr.s_addr); - g_message (" nameserver '%s'", *s); + nm_log_info (LOGD_DHCP4, " nameserver '%s'", *s); } else - g_warning ("Ignoring invalid nameserver '%s'", *s); + nm_log_warn (LOGD_DHCP4, "ignoring invalid nameserver '%s'", *s); } g_strfreev (searches); } @@ -796,7 +809,7 @@ ip4_options_to_config (NMDHCPClient *self) char **s; for (s = domains; *s; s++) { - g_message (" domain name '%s'", *s); + nm_log_info (LOGD_DHCP4, " domain name '%s'", *s); nm_ip4_config_add_domain (ip4_config, *s); } g_strfreev (domains); @@ -814,9 +827,9 @@ ip4_options_to_config (NMDHCPClient *self) for (s = searches; *s; s++) { if (inet_pton (AF_INET, *s, &tmp_addr) > 0) { nm_ip4_config_add_wins (ip4_config, tmp_addr.s_addr); - g_message (" wins '%s'", *s); + nm_log_info (LOGD_DHCP4, " wins '%s'", *s); } else - g_warning ("Ignoring invalid WINS server '%s'", *s); + nm_log_warn (LOGD_DHCP4, "ignoring invalid WINS server '%s'", *s); } g_strfreev (searches); } @@ -854,7 +867,7 @@ nm_dhcp_client_get_ip4_config (NMDHCPClient *self, gboolean test) priv = NM_DHCP_CLIENT_GET_PRIVATE (self); if (test && !state_is_bound (priv->state)) { - g_warning ("%s: dhcp client didn't bind to a lease.", priv->iface); + nm_log_warn (LOGD_DHCP4, "(%s): DHCP client didn't bind to a lease.", priv->iface); return NULL; } @@ -887,20 +900,20 @@ ip6_options_to_config (NMDHCPClient *self) ip6_config = nm_ip6_config_new (); if (!ip6_config) { - g_warning ("%s: couldn't allocate memory for an IP6Config!", priv->iface); + nm_log_warn (LOGD_DHCP6, "(%s): couldn't allocate memory for an IP6Config!", priv->iface); return NULL; } addr = nm_ip6_address_new (); if (!addr) { - g_warning ("%s: couldn't allocate memory for an IP6 Address!", priv->iface); + nm_log_warn (LOGD_DHCP6, "(%s): couldn't allocate memory for an IP6 Address!", priv->iface); goto error; } str = g_hash_table_lookup (priv->options, "new_ip6_address"); if (str && (inet_pton (AF_INET6, str, &tmp_addr) > 0)) { nm_ip6_address_set_address (addr, &tmp_addr); - g_message (" address %s", str); + nm_log_info (LOGD_DHCP6, " address %s", str); } else goto error; @@ -914,7 +927,7 @@ ip6_options_to_config (NMDHCPClient *self) goto error; nm_ip6_address_set_prefix (addr, (guint32) prefix); - g_message (" prefix %lu", prefix); + nm_log_info (LOGD_DHCP6, " prefix %lu", prefix); } nm_ip6_config_take_address (ip6_config, addr); @@ -922,7 +935,7 @@ ip6_options_to_config (NMDHCPClient *self) str = g_hash_table_lookup (priv->options, "new_host_name"); if (str) - g_message (" hostname '%s'", str); + nm_log_info (LOGD_DHCP6, " hostname '%s'", str); str = g_hash_table_lookup (priv->options, "new_dhcp6_name_servers"); if (str) { @@ -932,9 +945,9 @@ ip6_options_to_config (NMDHCPClient *self) for (s = searches; *s; s++) { if (inet_pton (AF_INET6, *s, &tmp_addr) > 0) { nm_ip6_config_add_nameserver (ip6_config, &tmp_addr); - g_message (" nameserver '%s'", *s); + nm_log_info (LOGD_DHCP6, " nameserver '%s'", *s); } else - g_warning ("Ignoring invalid nameserver '%s'", *s); + nm_log_warn (LOGD_DHCP6, "ignoring invalid nameserver '%s'", *s); } g_strfreev (searches); } @@ -963,7 +976,7 @@ nm_dhcp_client_get_ip6_config (NMDHCPClient *self, gboolean test) priv = NM_DHCP_CLIENT_GET_PRIVATE (self); if (test && !state_is_bound (priv->state)) { - g_warning ("%s: dhcp client didn't bind to a lease.", priv->iface); + nm_log_warn (LOGD_DHCP6, "(%s): dhcp client didn't bind to a lease.", priv->iface); return NULL; } diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index bf892bcfd7..37543edc0b 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -38,6 +38,7 @@ #include "nm-dhcp-dhclient.h" #include "nm-utils.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMDHCPDhclient, nm_dhcp_dhclient, NM_TYPE_DHCP_CLIENT) @@ -101,7 +102,7 @@ add_lease_option (GHashTable *hash, char *line) spc = strchr (line, ' '); if (!spc) { - g_warning ("%s: line '%s' did not contain a space", __func__, line); + nm_log_warn (LOGD_DHCP, "DHCP lease file line '%s' did not contain a space", line); return; } @@ -109,8 +110,8 @@ add_lease_option (GHashTable *hash, char *line) if (g_str_has_prefix (line, "option ")) { spc = strchr (spc + 1, ' '); if (!spc) { - g_warning ("%s: option line '%s' did not contain a second space", - __func__, line); + nm_log_warn (LOGD_DHCP, "DHCP lease file option line '%s' did not contain a second space", + line); return; } } @@ -168,9 +169,9 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) } else if (!strcmp (*line, "lease {")) { /* Beginning of a new lease */ if (hash) { - g_warning ("%s: lease file %s malformed; new lease started " - "without ending previous lease", - __func__, leasefile); + nm_log_warn (LOGD_DHCP, "DHCP lease file %s malformed; new lease started " + "without ending previous lease", + leasefile); g_hash_table_destroy (hash); } @@ -182,9 +183,9 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) /* Check if the last lease in the file was properly ended */ if (hash) { - g_warning ("%s: lease file %s malformed; new lease started " - "without ending previous lease", - __func__, leasefile); + nm_log_warn (LOGD_DHCP, "DHCP lease file %s malformed; new lease started " + "without ending previous lease", + leasefile); g_hash_table_destroy (hash); hash = NULL; } @@ -211,8 +212,8 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) /* Read lease expiration (in UTC) */ if (!strptime (data, "%w %Y/%m/%d %H:%M:%S", &expire)) { - g_warning ("%s: couldn't parse expire time '%s'", - __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file expire time '%s'", + data); continue; } @@ -254,7 +255,7 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) /* IP4 address */ if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 address '%s'", __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 address '%s'", data); goto error; } nm_ip4_address_set_address (addr, tmp.s_addr); @@ -263,7 +264,7 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) data = g_hash_table_lookup (hash, "option subnet-mask"); if (data) { if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 subnet mask '%s'", __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 subnet mask '%s'", data); goto error; } prefix = nm_utils_ip4_netmask_to_prefix (tmp.s_addr); @@ -277,7 +278,7 @@ nm_dhcp_dhclient_get_lease_config (const char *iface, const char *uuid) data = g_hash_table_lookup (hash, "option routers"); if (data) { if (!inet_pton (AF_INET, data, &tmp)) { - g_warning ("%s: couldn't parse IP4 gateway '%s'", __func__, data); + nm_log_warn (LOGD_DHCP, "couldn't parse DHCP lease file IP4 gateway '%s'", data); goto error; } nm_ip4_address_set_gateway (addr, tmp.s_addr); @@ -327,8 +328,8 @@ merge_dhclient_config (const char *iface, GError *read_error = NULL; if (!g_file_get_contents (orig_path, &orig_contents, NULL, &read_error)) { - nm_warning ("%s: error reading dhclient configuration %s: %s", - iface, orig_path, read_error->message); + nm_log_warn (LOGD_DHCP, "(%s): error reading dhclient configuration %s: %s", + iface, orig_path, read_error->message); g_error_free (read_error); } } @@ -445,7 +446,7 @@ create_dhclient_config (const char *iface, #endif if (!orig) { - nm_warning ("%s: not enough memory for dhclient options.", iface); + nm_log_warn (LOGD_DHCP, "(%s): not enough memory for dhclient options.", iface); return FALSE; } @@ -456,8 +457,8 @@ create_dhclient_config (const char *iface, error = NULL; success = merge_dhclient_config (iface, conf_file, s_ip4, dhcp_anycast_addr, orig, &error); if (!success) { - nm_warning ("%s: error creating dhclient configuration: %s", - iface, error->message); + nm_log_warn (LOGD_DHCP, "(%s): error creating dhclient configuration: %s", + iface, error->message); g_error_free (error); } @@ -486,6 +487,7 @@ dhclient_start (NMDHCPClient *client, const char *iface, *uuid; char *binary_name, *cmd_str; gboolean ipv6; + guint log_domain; g_return_val_if_fail (priv->pid_file == NULL, -1); g_return_val_if_fail (ip_opt != NULL, -1); @@ -494,16 +496,18 @@ dhclient_start (NMDHCPClient *client, uuid = nm_dhcp_client_get_uuid (client); ipv6 = nm_dhcp_client_get_ipv6 (client); + log_domain = ipv6 ? LOGD_DHCP6 : LOGD_DHCP4; + priv->pid_file = g_strdup_printf (LOCALSTATEDIR "/run/dhclient%s-%s.pid", ipv6 ? "6" : "", iface); if (!priv->pid_file) { - nm_warning ("%s: not enough memory for dhcpcd options.", iface); + nm_log_warn (log_domain, "(%s): not enough memory for dhcpcd options.", iface); return -1; } if (!g_file_test (priv->path, G_FILE_TEST_EXISTS)) { - nm_warning ("%s does not exist.", priv->path); + nm_log_warn (log_domain, "%s does not exist.", priv->path); return -1; } @@ -514,7 +518,7 @@ dhclient_start (NMDHCPClient *client, priv->lease_file = get_leasefile_for_iface (iface, uuid, ipv6); if (!priv->lease_file) { - nm_warning ("%s: not enough memory for dhclient options.", iface); + nm_log_warn (log_domain, "(%s): not enough memory for dhclient options.", iface); return -1; } @@ -546,16 +550,16 @@ dhclient_start (NMDHCPClient *client, g_ptr_array_add (argv, NULL); cmd_str = g_strjoinv (" ", (gchar **) argv->pdata); - nm_info ("running: %s", cmd_str); + nm_log_dbg (log_domain, "running: %s", cmd_str); g_free (cmd_str); if (!g_spawn_async (NULL, (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, &dhclient_child_setup, NULL, &pid, &error)) { - nm_warning ("dhclient failed to start. error: '%s'", error->message); + nm_log_warn (log_domain, "dhclient failed to start: '%s'", error->message); g_error_free (error); pid = -1; } else - nm_info ("dhclient started with pid %d", pid); + nm_log_info (log_domain, "dhclient started with pid %d", pid); g_ptr_array_free (argv, TRUE); return pid; @@ -573,7 +577,7 @@ real_ip4_start (NMDHCPClient *client, priv->conf_file = create_dhclient_config (iface, s_ip4, dhcp_anycast_addr); if (!priv->conf_file) { - nm_warning ("%s: error creating dhclient configuration file.", iface); + nm_log_warn (LOGD_DHCP4, "(%s): error creating dhclient configuration file.", iface); return -1; } @@ -694,7 +698,7 @@ real_ip4_process_classless_routes (NMDHCPClient *client, o = octets = g_strsplit (str, " ", 0); if (g_strv_length (octets) < 5) { - nm_warning ("Ignoring invalid classless static routes '%s'", str); + nm_log_warn (LOGD_DHCP4, "ignoring invalid classless static routes '%s'", str); goto out; } @@ -702,7 +706,7 @@ real_ip4_process_classless_routes (NMDHCPClient *client, route = NULL; o = (char **) process_rfc3442_route ((const char **) o, &route); if (!route) { - nm_warning ("Ignoring invalid classless static routes"); + nm_log_warn (LOGD_DHCP4, "ignoring invalid classless static routes"); break; } @@ -723,8 +727,8 @@ real_ip4_process_classless_routes (NMDHCPClient *client, inet_ntop (AF_INET, &tmp, addr, sizeof (addr)); tmp.s_addr = nm_ip4_route_get_next_hop (route); inet_ntop (AF_INET, &tmp, nh, sizeof (nh)); - nm_info (" classless static route %s/%d gw %s", - addr, nm_ip4_route_get_prefix (route), nh); + nm_log_info (LOGD_DHCP4, " classless static route %s/%d gw %s", + addr, nm_ip4_route_get_prefix (route), nh); } } diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c index 123ac06ab7..56b74810dc 100644 --- a/src/dhcp-manager/nm-dhcp-dhcpcd.c +++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c @@ -34,6 +34,7 @@ #include "nm-dhcp-dhcpcd.h" #include "nm-utils.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMDHCPDhcpcd, nm_dhcp_dhcpcd, NM_TYPE_DHCP_DHCPCD) @@ -103,12 +104,12 @@ real_ip4_start (NMDHCPClient *client, priv->pid_file = g_strdup_printf (LOCALSTATEDIR "/run/dhcpcd-%s.pid", iface); if (!priv->pid_file) { - nm_warning ("%s: not enough memory for dhcpcd options.", iface); + nm_log_warn (LOGD_DHCP4, "(%s): not enough memory for dhcpcd options.", iface); return -1; } if (!g_file_test (priv->path, G_FILE_TEST_EXISTS)) { - nm_warning ("%s does not exist.", priv->path); + nm_log_warn (LOGD_DHCP4, "%s does not exist.", priv->path); return -1; } @@ -139,15 +140,15 @@ real_ip4_start (NMDHCPClient *client, g_ptr_array_add (argv, NULL); cmd_str = g_strjoinv (" ", (gchar **) argv->pdata); - nm_info ("running: %s", cmd_str); + nm_log_dbg (LOGD_DHCP4, "running: %s", cmd_str); g_free (cmd_str); if (!g_spawn_async (NULL, (char **) argv->pdata, NULL, G_SPAWN_DO_NOT_REAP_CHILD, &dhcpcd_child_setup, NULL, &pid, &error)) { - nm_warning ("dhcpcd failed to start. error: '%s'", error->message); + nm_log_warn (LOGD_DHCP4, "dhcpcd failed to start. error: '%s'", error->message); g_error_free (error); } else - nm_info ("dhcpcd started with pid %d", pid); + nm_log_info (LOGD_DHCP4, "dhcpcd started with pid %d", pid); g_free (pid_contents); g_ptr_array_free (argv, TRUE); @@ -160,7 +161,7 @@ real_ip6_start (NMDHCPClient *client, guint8 *dhcp_anycast_addr, gboolean info_only) { - g_warning ("The dhcpcd backend does not support IPv6."); + nm_log_warn (LOGD_DHCP6, "the dhcpcd backend does not support IPv6."); return -1; } @@ -202,7 +203,7 @@ real_ip4_process_classless_routes (NMDHCPClient *client, goto out; if ((g_strv_length (routes) % 2) != 0) { - nm_info (" classless static routes provided, but invalid"); + nm_log_warn (LOGD_DHCP4, " classless static routes provided, but invalid"); goto out; } @@ -219,16 +220,16 @@ real_ip4_process_classless_routes (NMDHCPClient *client, errno = 0; rt_cidr = strtol (slash + 1, NULL, 10); if ((errno == EINVAL) || (errno == ERANGE)) { - nm_warning ("DHCP provided invalid classless static route cidr: '%s'", slash + 1); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route cidr: '%s'", slash + 1); continue; } } if (inet_pton (AF_INET, *r, &rt_addr) <= 0) { - nm_warning ("DHCP provided invalid classless static route address: '%s'", *r); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route address: '%s'", *r); continue; } if (inet_pton (AF_INET, *(r + 1), &rt_route) <= 0) { - nm_warning ("DHCP provided invalid classless static route gateway: '%s'", *(r + 1)); + nm_log_warn (LOGD_DHCP4, "DHCP provided invalid classless static route gateway: '%s'", *(r + 1)); continue; } @@ -244,7 +245,7 @@ real_ip4_process_classless_routes (NMDHCPClient *client, nm_ip4_config_take_route (ip4_config, route); - nm_info (" classless static route %s/%d gw %s", *r, rt_cidr, *(r + 1)); + nm_log_info (LOGD_DHCP4, " classless static route %s/%d gw %s", *r, rt_cidr, *(r + 1)); } } diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c index 765606788f..94109adcf6 100644 --- a/src/dhcp-manager/nm-dhcp-manager.c +++ b/src/dhcp-manager/nm-dhcp-manager.c @@ -38,7 +38,7 @@ #include "nm-dhcp-dhclient.h" #include "nm-dhcp-dhcpcd.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "nm-hostname-provider.h" #include "nm-dbus-glib-types.h" @@ -125,7 +125,7 @@ garray_to_string (GArray *array, const char *key) converted = str->str; if (!g_utf8_validate (converted, -1, NULL)) - nm_warning ("%s: DHCP option '%s' couldn't be converted to UTF-8", __func__, key); + nm_log_warn (LOGD_DHCP, "DHCP option '%s' couldn't be converted to UTF-8", key); g_string_free (str, FALSE); return converted; } @@ -190,9 +190,9 @@ get_option (GHashTable *hash, const char *key) return NULL; if (G_VALUE_TYPE (value) != DBUS_TYPE_G_UCHAR_ARRAY) { - g_warning ("Unexpected key %s value type was not " - "DBUS_TYPE_G_UCHAR_ARRAY", - (char *) key); + nm_log_warn (LOGD_DHCP, "unexpected key %s value type was not " + "DBUS_TYPE_G_UCHAR_ARRAY", + (char *) key); return NULL; } @@ -217,37 +217,37 @@ nm_dhcp_manager_handle_event (DBusGProxy *proxy, iface = get_option (options, "interface"); if (iface == NULL) { - nm_warning ("DHCP event didn't have associated interface."); + nm_log_warn (LOGD_DHCP, "DHCP event didn't have associated interface."); goto out; } pid_str = get_option (options, "pid"); if (pid_str == NULL) { - nm_warning ("DHCP event didn't have associated PID."); + nm_log_warn (LOGD_DHCP, "DHCP event didn't have associated PID."); goto out; } temp = strtoul (pid_str, NULL, 10); if ((temp == ULONG_MAX) && (errno == ERANGE)) { - nm_warning ("Couldn't convert PID"); + nm_log_warn (LOGD_DHCP, "couldn't convert PID"); goto out; } client = get_client_for_pid (manager, (GPid) temp); if (client == NULL) { - nm_warning ("Unhandled DHCP event for interface %s", iface); + nm_log_warn (LOGD_DHCP, "unhandled DHCP event for interface %s", iface); goto out; } if (strcmp (iface, nm_dhcp_client_get_iface (client))) { - nm_warning ("Received DHCP event from unexpected interface '%s' (expected '%s')", - iface, nm_dhcp_client_get_iface (client)); + nm_log_warn (LOGD_DHCP, "received DHCP event from unexpected interface '%s' (expected '%s')", + iface, nm_dhcp_client_get_iface (client)); goto out; } reason = get_option (options, "reason"); if (reason == NULL) { - nm_warning ("DHCP event didn't have a reason"); + nm_log_warn (LOGD_DHCP, "DHCP event didn't have a reason"); goto out; } @@ -573,7 +573,7 @@ nm_dhcp_manager_test_ip4_options_to_config (const char *dhcp_client, client_type = get_client_type (dhcp_client, &error); if (!client_type) { - g_warning ("Error: %s", error ? error->message : "(unknown)"); + nm_log_err (LOGD_DHCP4, "error: %s", error ? error->message : "(unknown)"); g_clear_error (&error); return NULL; } From 15e32cd4dc4644d3cb7cdff3f0762ccd3c1865fb Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:13:12 -0700 Subject: [PATCH 031/105] supplicant: update logging --- src/supplicant-manager/Makefile.am | 2 + src/supplicant-manager/nm-supplicant-config.c | 67 ++++++++++--------- .../nm-supplicant-interface.c | 52 +++++++------- .../nm-supplicant-manager.c | 6 +- 4 files changed, 68 insertions(+), 59 deletions(-) diff --git a/src/supplicant-manager/Makefile.am b/src/supplicant-manager/Makefile.am index 540ef76481..e59ae84319 100644 --- a/src/supplicant-manager/Makefile.am +++ b/src/supplicant-manager/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS=. tests INCLUDES = \ -I${top_srcdir}/src \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_builddir}/marshallers \ @@ -28,6 +29,7 @@ libsupplicant_manager_la_CPPFLAGS = \ libsupplicant_manager_la_LIBADD = \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) diff --git a/src/supplicant-manager/nm-supplicant-config.c b/src/supplicant-manager/nm-supplicant-config.c index 5f8c4f45df..b516de520b 100644 --- a/src/supplicant-manager/nm-supplicant-config.c +++ b/src/supplicant-manager/nm-supplicant-config.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -31,7 +31,7 @@ #include "nm-supplicant-config.h" #include "nm-supplicant-settings-verify.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-setting.h" #include "NetworkManagerUtils.h" @@ -123,26 +123,26 @@ nm_supplicant_config_add_option_with_type (NMSupplicantConfig *self, char buf[255]; memset (&buf[0], 0, sizeof (buf)); memcpy (&buf[0], value, len > 254 ? 254 : len); - nm_debug ("Key '%s' and/or value '%s' invalid.", key, buf); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' and/or value '%s' invalid.", key, buf); return FALSE; } } old_opt = (ConfigOption *) g_hash_table_lookup (priv->config, key); if (old_opt) { - nm_debug ("Key '%s' already in table.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' already in table.", key); return FALSE; } opt = g_slice_new0 (ConfigOption); if (opt == NULL) { - nm_debug ("Couldn't allocate memory for new config option."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option."); return FALSE; } opt->value = g_malloc0 ((sizeof (char) * len) + 1); if (opt->value == NULL) { - nm_debug ("Couldn't allocate memory for new config option value."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option value."); g_slice_free (ConfigOption, opt); return FALSE; } @@ -151,12 +151,13 @@ nm_supplicant_config_add_option_with_type (NMSupplicantConfig *self, opt->len = len; opt->type = type; -{ -char buf[255]; -memset (&buf[0], 0, sizeof (buf)); -memcpy (&buf[0], opt->value, opt->len > 254 ? 254 : opt->len); -nm_info ("Config: added '%s' value '%s'", key, secret ? "" : &buf[0]); -} + { + char buf[255]; + memset (&buf[0], 0, sizeof (buf)); + memcpy (&buf[0], opt->value, opt->len > 254 ? 254 : opt->len); + nm_log_info (LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, secret ? "" : &buf[0]); + } + g_hash_table_insert (priv->config, g_strdup (key), opt); return TRUE; @@ -194,33 +195,33 @@ nm_supplicant_config_add_blob (NMSupplicantConfig *self, type = nm_supplicant_settings_verify_setting (key, (const char *) value->data, value->len); if (type == TYPE_INVALID) { - nm_debug ("Key '%s' and/or it's contained value is invalid.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' and/or it's contained value is invalid.", key); return FALSE; } old_opt = (ConfigOption *) g_hash_table_lookup (priv->config, key); if (old_opt) { - nm_debug ("Key '%s' already in table.", key); + nm_log_warn (LOGD_SUPPLICANT, "Key '%s' already in table.", key); return FALSE; } blob = g_byte_array_sized_new (value->len); if (!blob) { - nm_debug ("Couldn't allocate memory for new config blob."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config blob."); return FALSE; } g_byte_array_append (blob, value->data, value->len); opt = g_slice_new0 (ConfigOption); if (opt == NULL) { - nm_debug ("Couldn't allocate memory for new config option."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option."); g_byte_array_free (blob, TRUE); return FALSE; } opt->value = g_strdup_printf ("blob://%s", blobid); if (opt->value == NULL) { - nm_debug ("Couldn't allocate memory for new config option value."); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't allocate memory for new config option value."); g_byte_array_free (blob, TRUE); g_slice_free (ConfigOption, opt); return FALSE; @@ -229,7 +230,7 @@ nm_supplicant_config_add_blob (NMSupplicantConfig *self, opt->len = strlen (opt->value); opt->type = type; -nm_info ("Config: added '%s' value '%s'", key, opt->value); + nm_log_info (LOGD_SUPPLICANT, "Config: added '%s' value '%s'", key, opt->value); g_hash_table_insert (priv->config, g_strdup (key), opt); g_hash_table_insert (priv->blobs, g_strdup (blobid), blob); @@ -378,13 +379,13 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, id = nm_setting_wireless_get_ssid (setting); if (!nm_supplicant_config_add_option (self, "ssid", (char *) id->data, id->len, FALSE)) { - nm_warning ("Error adding SSID to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding SSID to supplicant config."); return FALSE; } if (is_adhoc) { if (!nm_supplicant_config_add_option (self, "mode", "1", -1, FALSE)) { - nm_warning ("Error adding mode to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding mode to supplicant config."); return FALSE; } @@ -394,7 +395,7 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, str_freq = g_strdup_printf ("%u", adhoc_freq); if (!nm_supplicant_config_add_option (self, "frequency", str_freq, -1, FALSE)) { g_free (str_freq); - nm_warning ("Error adding Ad-Hoc frequency to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding Ad-Hoc frequency to supplicant config."); return FALSE; } g_free (str_freq); @@ -418,7 +419,7 @@ nm_supplicant_config_add_setting_wireless (NMSupplicantConfig * self, str_bssid, strlen (str_bssid), FALSE)) { g_free (str_bssid); - nm_warning ("Error adding BSSID to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding BSSID to supplicant config."); return FALSE; } g_free (str_bssid); @@ -445,7 +446,7 @@ add_string_val (NMSupplicantConfig *self, value = ucase ? g_ascii_strup (field, -1) : g_strdup (field); success = nm_supplicant_config_add_option (self, name, value, strlen (field), secret); if (!success) - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); g_free (value); return success; } @@ -471,7 +472,7 @@ add_string_val (NMSupplicantConfig *self, success = TRUE; \ g_string_free (str, TRUE); \ if (!success) { \ - nm_warning ("Error adding %s to supplicant config.", name); \ + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); \ return FALSE; \ } \ } @@ -494,7 +495,7 @@ get_blob_id (const char *name, const char *seed_uid) success = nm_supplicant_config_add_blob (self, name, field, uid); \ g_free (uid); \ if (!success) { \ - nm_warning ("Error adding %s to supplicant config.", name); \ + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); \ return FALSE; \ } \ } @@ -550,16 +551,16 @@ add_wep_key (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, name, value, key_len / 2, TRUE); g_free (value); if (!success) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } else if ((key_len == 5) || (key_len == 13)) { if (!nm_supplicant_config_add_option (self, name, key, key_len, TRUE)) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } else { - nm_warning ("Invalid WEP key '%s'", name); + nm_log_warn (LOGD_SUPPLICANT, "Invalid WEP key '%s'", name); return FALSE; } } else if (wep_type == NM_WEP_KEY_TYPE_PASSPHRASE) { @@ -570,7 +571,7 @@ add_wep_key (NMSupplicantConfig *self, if (success) success = nm_supplicant_config_add_option (self, name, (const char *) digest, digest_len, TRUE); if (!success) { - nm_warning ("Error adding %s to supplicant config.", name); + nm_log_warn (LOGD_SUPPLICANT, "Error adding %s to supplicant config.", name); return FALSE; } } @@ -611,7 +612,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, "psk", value, psk_len / 2, TRUE); g_free (value); if (!success) { - nm_warning ("Error adding 'psk' to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding 'psk' to supplicant config."); return FALSE; } } else if (psk_len >= 8 && psk_len <= 63) { @@ -621,12 +622,12 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, * passphrase and not a hex key. */ if (!nm_supplicant_config_add_option_with_type (self, "psk", psk, -1, TYPE_STRING, TRUE)) { - nm_warning ("Error adding 'psk' to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding 'psk' to supplicant config."); return FALSE; } } else { /* Invalid PSK */ - nm_warning ("Invalid PSK length %u: not between 8 and 63 characters inclusive.", (guint32) psk_len); + nm_log_warn (LOGD_SUPPLICANT, "Invalid PSK length %u: not between 8 and 63 characters inclusive.", (guint32) psk_len); return FALSE; } } @@ -662,7 +663,7 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self, success = nm_supplicant_config_add_option (self, "wep_tx_keyidx", value, -1, FALSE); g_free (value); if (!success) { - nm_warning ("Error adding wep_tx_keyidx to supplicant config."); + nm_log_warn (LOGD_SUPPLICANT, "Error adding wep_tx_keyidx to supplicant config."); return FALSE; } } diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 00f0c307ee..4307a9ebc2 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -25,7 +25,7 @@ #include "nm-supplicant-interface.h" #include "nm-supplicant-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "nm-supplicant-config.h" #include "nm-dbus-manager.h" @@ -498,8 +498,10 @@ bssid_properties_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_ if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_MAP_OF_VARIANT, &hash, G_TYPE_INVALID)) { - if (!strstr (err->message, "The BSSID requested was invalid")) - nm_warning ("Couldn't retrieve BSSID properties: %s.", err->message); + if (!strstr (err->message, "The BSSID requested was invalid")) { + nm_log_warn (LOGD_SUPPLICANT, "Couldn't retrieve BSSID properties: %s.", + err->message); + } g_error_free (err); } else { g_signal_emit (info->interface, @@ -543,7 +545,7 @@ scan_results_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, &array, G_TYPE_INVALID)) { - nm_warning ("could not get scan results: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "could not get scan results: %s.", err->message); g_error_free (err); } else { int i; @@ -672,7 +674,7 @@ iface_state_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_STRING, &state_str, G_TYPE_INVALID)) { - nm_warning ("could not get interface state: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "could not get interface state: %s.", err->message); g_error_free (err); } else { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; @@ -780,7 +782,8 @@ nm_supplicant_interface_add_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpoi /* Interface already added, just try to get the interface */ nm_supplicant_interface_add_to_supplicant (info->interface, TRUE); } else { - nm_warning ("Unexpected supplicant error getting interface: %s", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Unexpected supplicant error getting interface: %s", + err->message); } g_error_free (err); @@ -893,7 +896,7 @@ nm_supplicant_interface_start (NMSupplicantInterface * self) * that its state has changed. */ } else - nm_warning ("Unknown supplicant manager state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant manager state!"); } static void @@ -914,7 +917,7 @@ nm_supplicant_interface_handle_supplicant_manager_idle_state (NMSupplicantInterf /* Don't do anything here; interface can't get out of DOWN state */ break; default: - nm_warning ("Unknown supplicant interface state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant interface state!"); break; } } @@ -970,7 +973,7 @@ nm_supplicant_interface_smgr_state_changed (NMSupplicantManager * smgr, nm_supplicant_interface_handle_supplicant_manager_idle_state (self); break; default: - nm_warning ("Unknown supplicant manager state!"); + nm_log_warn (LOGD_SUPPLICANT, "Unknown supplicant manager state!"); break; } } @@ -983,7 +986,8 @@ remove_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_dat guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't remove network from supplicant interface: %s.", err->message); + nm_log_dbg (LOGD_SUPPLICANT, "Couldn't remove network from supplicant interface: %s.", + err->message); g_error_free (err); } } @@ -995,7 +999,8 @@ disconnect_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't disconnect supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't disconnect supplicant interface: %s.", + err->message); g_error_free (err); } } @@ -1057,7 +1062,7 @@ select_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_dat guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't select network config: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't select network config: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } @@ -1072,7 +1077,7 @@ set_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't set network config: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't set network config: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1116,7 +1121,7 @@ set_blobs_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) guint tmp; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't set network blobs: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't set network certificates: %s.", err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1165,7 +1170,8 @@ call_set_blobs (NMSupplicantInfo *info, GHashTable *orig_blobs) (GDestroyNotify) blob_free); if (!blobs) { const char *msg = "Not enough memory to create blob table."; - nm_warning ("%s", msg); + + nm_log_warn (LOGD_SUPPLICANT, "%s", msg); g_signal_emit (info->interface, nm_supplicant_interface_signals[CONNECTION_ERROR], 0, "SendBlobError", msg); @@ -1194,7 +1200,8 @@ add_network_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, DBUS_TYPE_G_OBJECT_PATH, &path, G_TYPE_INVALID)) { - nm_warning ("Couldn't add a network to the supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't add a network to the supplicant interface: %s.", + err->message); emit_error_helper (info->interface, err); g_error_free (err); } else { @@ -1225,22 +1232,21 @@ static void set_ap_scan_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); GError *err = NULL; guint32 tmp; DBusGProxyCall *call; if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &tmp, G_TYPE_INVALID)) { - nm_warning ("Couldn't send AP scan mode to the supplicant interface: %s.", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Couldn't send AP scan mode to the supplicant interface: %s.", + err->message); emit_error_helper (info->interface, err); g_error_free (err); return; } -{ -NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); -int ap_scan = nm_supplicant_config_get_ap_scan (priv->cfg); -nm_info ("Config: set interface ap_scan to %d", ap_scan); -} + nm_log_info (LOGD_SUPPLICANT, "Config: set interface ap_scan to %d", + nm_supplicant_config_get_ap_scan (priv->cfg)); info = nm_supplicant_info_new (info->interface, proxy, info->store); call = dbus_g_proxy_begin_call (proxy, "addNetwork", @@ -1306,7 +1312,7 @@ scan_request_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_UINT, &success, G_TYPE_INVALID)) { - nm_warning ("Could not get scan request result: %s", err->message); + nm_log_warn (LOGD_SUPPLICANT, "Could not get scan request result: %s", err->message); g_error_free (err); } diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c index 7a177ab181..f8390437dc 100644 --- a/src/supplicant-manager/nm-supplicant-manager.c +++ b/src/supplicant-manager/nm-supplicant-manager.c @@ -27,7 +27,7 @@ #include "nm-supplicant-interface.h" #include "nm-dbus-manager.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-glib-compat.h" #define SUPPLICANT_POKE_INTERVAL 120 @@ -97,11 +97,11 @@ poke_supplicant_cb (gpointer user_data) WPAS_DBUS_PATH, WPAS_DBUS_INTERFACE); if (!proxy) { - nm_warning ("Error: could not init wpa_supplicant proxy"); + nm_log_warn (LOGD_SUPPLICANT, "Error: could not init wpa_supplicant proxy"); goto out; } - nm_info ("Trying to start the supplicant..."); + nm_log_info (LOGD_SUPPLICANT, "Trying to start the supplicant..."); dbus_g_proxy_call_no_reply (proxy, "getInterface", G_TYPE_STRING, tmp, G_TYPE_INVALID); g_object_unref (proxy); From 6021761081145a5cbdd7812044f094a3e04f1d64 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:13:44 -0700 Subject: [PATCH 032/105] backends: update logging --- src/backends/Makefile.am | 20 +++++++++++++------- src/backends/NetworkManagerDebian.c | 4 ++-- src/backends/NetworkManagerGeneric.c | 8 +++++--- src/backends/NetworkManagerGentoo.c | 4 ++-- src/backends/NetworkManagerPaldo.c | 4 ++-- src/backends/NetworkManagerSuSE.c | 4 ++-- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am index 0e037c41d1..c3485e5f9b 100644 --- a/src/backends/Makefile.am +++ b/src/backends/Makefile.am @@ -1,9 +1,11 @@ -INCLUDES = -I${top_srcdir} \ - -I${top_srcdir}/include \ - -I${top_srcdir}/src \ - -I${top_srcdir}/src/vpn-manager \ - -I${top_srcdir}/src/named-manager \ - -I${top_srcdir}/libnm-util +INCLUDES = \ + -I${top_srcdir} \ + -I${top_srcdir}/src/logging \ + -I${top_srcdir}/include \ + -I${top_srcdir}/src \ + -I${top_srcdir}/src/vpn-manager \ + -I${top_srcdir}/src/named-manager \ + -I${top_srcdir}/libnm-util noinst_LTLIBRARIES = libnmbackend.la @@ -53,7 +55,11 @@ if TARGET_PARDUS libnmbackend_la_SOURCES += NetworkManagerPardus.c endif -libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS) +libnmbackend_la_LIBADD += \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + libnmbackend_la_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(GLIB_CFLAGS) \ diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c index cba1363f3a..ef9475af6d 100644 --- a/src/backends/NetworkManagerDebian.c +++ b/src/backends/NetworkManagerDebian.c @@ -34,7 +34,7 @@ #include "NetworkManagerGeneric.h" #include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -57,7 +57,7 @@ void nm_system_enable_loopback (void) void nm_system_update_dns (void) { if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } } diff --git a/src/backends/NetworkManagerGeneric.c b/src/backends/NetworkManagerGeneric.c index 26076fa678..4f8336d9bb 100644 --- a/src/backends/NetworkManagerGeneric.c +++ b/src/backends/NetworkManagerGeneric.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * * Timothee Lecomte @@ -36,7 +37,7 @@ #include "nm-system.h" #include "NetworkManagerUtils.h" #include "nm-netlink.h" -#include "nm-utils.h" +#include "nm-logging.h" /* Because of a bug in libnl, rtnl.h should be included before route.h */ #include @@ -93,8 +94,9 @@ void nm_generic_enable_loopback (void) rtnl_addr_set_label (addr, "lo"); if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) { - if (err != -EEXIST) - nm_warning ("error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); + if (err != -EEXIST) { + nm_log_warn (LOGD_CORE, "error %d returned from rtnl_addr_add():\n%s", err, nl_geterror()); + } } out: if (addr) diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c index 8616941f1a..8d9e68c59c 100644 --- a/src/backends/NetworkManagerGentoo.c +++ b/src/backends/NetworkManagerGentoo.c @@ -34,7 +34,7 @@ #include "NetworkManagerGeneric.h" #include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -59,7 +59,7 @@ void nm_system_enable_loopback (void) void nm_system_update_dns (void) { if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } } diff --git a/src/backends/NetworkManagerPaldo.c b/src/backends/NetworkManagerPaldo.c index 777d4e23e1..0c67e5bdf6 100644 --- a/src/backends/NetworkManagerPaldo.c +++ b/src/backends/NetworkManagerPaldo.c @@ -33,7 +33,7 @@ #include "NetworkManagerGeneric.h" #include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -55,7 +55,7 @@ void nm_system_enable_loopback (void) */ void nm_system_update_dns (void) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c index ef4ff15b37..6c8ec1a5d6 100644 --- a/src/backends/NetworkManagerSuSE.c +++ b/src/backends/NetworkManagerSuSE.c @@ -34,7 +34,7 @@ #include "NetworkManagerGeneric.h" #include "nm-system.h" #include "NetworkManagerUtils.h" -#include "nm-utils.h" +#include "nm-logging.h" /* * nm_system_enable_loopback @@ -56,7 +56,7 @@ void nm_system_enable_loopback (void) */ void nm_system_update_dns (void) { - nm_info ("Clearing nscd hosts cache."); + nm_log_info (LOGD_DNS, "Clearing nscd hosts cache."); nm_spawn_process ("/usr/sbin/nscd -i hosts"); } From e56fc836114a1f8be6c7b4201616669fe0058117 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:20:30 -0700 Subject: [PATCH 033/105] dnsmasq: update logging --- src/dnsmasq-manager/Makefile.am | 5 +- src/dnsmasq-manager/nm-dnsmasq-manager.c | 60 ++++++++++++------------ 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/dnsmasq-manager/Makefile.am b/src/dnsmasq-manager/Makefile.am index 71d3873ecb..66bbdd83f8 100644 --- a/src/dnsmasq-manager/Makefile.am +++ b/src/dnsmasq-manager/Makefile.am @@ -1,5 +1,6 @@ INCLUDES = \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_srcdir}/include @@ -13,4 +14,6 @@ libdnsmasq_manager_la_CPPFLAGS = \ $(GLIB_CFLAGS) \ -DLOCALSTATEDIR=\"$(localstatedir)\" -libdnsmasq_manager_la_LIBADD = $(GLIB_LIBS) +libdnsmasq_manager_la_LIBADD = \ + $(top_builddir)/src/logging/libnm-logging.la \ + $(GLIB_LIBS) diff --git a/src/dnsmasq-manager/nm-dnsmasq-manager.c b/src/dnsmasq-manager/nm-dnsmasq-manager.c index 5538c82ff2..ea529c77eb 100644 --- a/src/dnsmasq-manager/nm-dnsmasq-manager.c +++ b/src/dnsmasq-manager/nm-dnsmasq-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -27,7 +27,7 @@ #include #include "nm-dnsmasq-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-glib-compat.h" typedef struct { @@ -168,13 +168,12 @@ nm_cmd_line_add_string (NMCmdLine *cmd, const char *str) static inline const char * nm_find_dnsmasq (void) { - static const char *dnsmasq_binary_paths[] = - { - "/usr/local/sbin/dnsmasq", - "/usr/sbin/dnsmasq", - "/sbin/dnsmasq", - NULL - }; + static const char *dnsmasq_binary_paths[] = { + "/usr/local/sbin/dnsmasq", + "/usr/sbin/dnsmasq", + "/sbin/dnsmasq", + NULL + }; const char **dnsmasq_binary = dnsmasq_binary_paths; @@ -214,7 +213,7 @@ dm_exit_code (guint dm_exit_status) break; } - g_warning ("dnsmasq exited with error: %s (%d)", msg, dm_exit_status); + nm_log_warn (LOGD_SHARING, "dnsmasq exited with error: %s (%d)", msg, dm_exit_status); } static void @@ -228,12 +227,13 @@ dm_watch_cb (GPid pid, gint status, gpointer user_data) err = WEXITSTATUS (status); if (err != 0) dm_exit_code (err); - } else if (WIFSTOPPED (status)) - g_warning ("dnsmasq stopped unexpectedly with signal %d", WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - g_warning ("dnsmasq died with signal %d", WTERMSIG (status)); - else - g_warning ("dnsmasq died from an unknown cause"); + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_SHARING, "dnsmasq stopped unexpectedly with signal %d", WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_SHARING, "dnsmasq died with signal %d", WTERMSIG (status)); + } else { + nm_log_warn (LOGD_SHARING, "dnsmasq died from an unknown cause"); + } priv->pid = 0; @@ -288,8 +288,8 @@ create_dm_cmd_line (const char *iface, s = g_string_new ("--listen-address="); addr.s_addr = nm_ip4_address_get_address (tmp); if (!inet_ntop (AF_INET, &addr, &localaddr[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, localaddr); @@ -301,8 +301,8 @@ create_dm_cmd_line (const char *iface, /* Add start of address range */ addr.s_addr = nm_ip4_address_get_address (tmp) + htonl (9); if (!inet_ntop (AF_INET, &addr, &buf[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, buf); @@ -312,8 +312,8 @@ create_dm_cmd_line (const char *iface, /* Add end of address range */ addr.s_addr = nm_ip4_address_get_address (tmp) + htonl (99); if (!inet_ntop (AF_INET, &addr, &buf[0], INET_ADDRSTRLEN)) { - nm_warning ("%s: error converting IP4 address 0x%X", - __func__, ntohl (addr.s_addr)); + nm_log_warn (LOGD_SHARING, "error converting IP4 address 0x%X", + ntohl (addr.s_addr)); goto error; } g_string_append (s, buf); @@ -370,7 +370,7 @@ kill_existing_for_iface (const char *iface, const char *pidfile) if (strstr (cmdline_contents, "bin/dnsmasq")) { if (kill (pid, 0)) { - nm_info ("Killing stale dnsmasq process %ld", pid); + nm_log_dbg (LOGD_SHARING, "Killing stale dnsmasq process %ld", pid); kill (pid, SIGKILL); } unlink (pidfile); @@ -405,10 +405,10 @@ nm_dnsmasq_manager_start (NMDnsMasqManager *manager, g_ptr_array_add (dm_cmd->array, NULL); - nm_info ("Starting dnsmasq..."); + nm_log_info (LOGD_SHARING, "Starting dnsmasq..."); cmd_str = nm_cmd_line_to_str (dm_cmd); - nm_debug ("Command line: %s", cmd_str); + nm_log_dbg (LOGD_SHARING, "Command line: %s", cmd_str); g_free (cmd_str); priv->pid = 0; @@ -419,7 +419,7 @@ nm_dnsmasq_manager_start (NMDnsMasqManager *manager, goto out; } - nm_debug ("dnsmasq started with pid %d", priv->pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq started with pid %d", priv->pid); priv->dm_watch_id = g_child_watch_add (priv->pid, (GChildWatchFunc) dm_watch_cb, manager); @@ -439,9 +439,9 @@ ensure_killed (gpointer data) kill (pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for dnsmasq pid %d to exit", pid); + nm_log_dbg (LOGD_SHARING, "waiting for dnsmasq pid %d to exit", pid); waitpid (pid, NULL, 0); - nm_debug ("dnsmasq pid %d cleaned up", pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq pid %d cleaned up", pid); return FALSE; } @@ -467,9 +467,9 @@ nm_dnsmasq_manager_stop (NMDnsMasqManager *manager) kill (priv->pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for dnsmasq pid %d to exit", priv->pid); + nm_log_dbg (LOGD_SHARING, "waiting for dnsmasq pid %d to exit", priv->pid); waitpid (priv->pid, NULL, 0); - nm_debug ("dnsmasq pid %d cleaned up", priv->pid); + nm_log_dbg (LOGD_SHARING, "dnsmasq pid %d cleaned up", priv->pid); } priv->pid = 0; From ee109b94d9119ba37152e2f1354955fcdfa52035 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:41:53 -0700 Subject: [PATCH 034/105] ip6-manager: update logging --- src/ip6-manager/Makefile.am | 7 +++++-- src/ip6-manager/nm-ip6-manager.c | 28 +++++++++++++-------------- src/ip6-manager/nm-netlink-listener.c | 1 - 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/ip6-manager/Makefile.am b/src/ip6-manager/Makefile.am index 50db421fcd..9f5229f77b 100644 --- a/src/ip6-manager/Makefile.am +++ b/src/ip6-manager/Makefile.am @@ -3,6 +3,7 @@ INCLUDES = \ -I${top_srcdir}/include \ -I${top_builddir}/marshallers \ -I${top_srcdir}/libnm-util \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_srcdir}/src/named-manager @@ -21,6 +22,8 @@ libip6_manager_la_CPPFLAGS = \ -DG_DISABLE_DEPRECATED libip6_manager_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ - $(GLIB_LIBS) \ - $(top_builddir)/marshallers/libmarshallers.la + $(GLIB_LIBS) + diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c index 20e1a7f939..be85ab0dc0 100644 --- a/src/ip6-manager/nm-ip6-manager.c +++ b/src/ip6-manager/nm-ip6-manager.c @@ -28,7 +28,7 @@ #include "nm-netlink-listener.h" #include "NetworkManagerUtils.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" /* Pre-DHCP addrconf timeout, in seconds */ #define NM_IP6_TIMEOUT 10 @@ -213,7 +213,7 @@ nm_ip6_manager_new (void) priv = NM_IP6_MANAGER_GET_PRIVATE (manager); if (!priv->devices_by_iface || !priv->devices_by_index) { - nm_warning ("Error: not enough memory to initialize IP6 manager tables"); + nm_log_err (LOGD_IP6, "not enough memory to initialize IP6 manager tables"); g_object_unref (manager); manager = NULL; } @@ -250,8 +250,8 @@ finish_addrconf (gpointer user_data) g_signal_emit (manager, signals[ADDRCONF_COMPLETE], 0, device->iface, info->dhcp_opts, TRUE); } else { - nm_info ("Device '%s' IP6 addrconf timed out or failed.", - device->iface); + nm_log_info (LOGD_IP6, "(%s): IP6 addrconf timed out or failed.", + device->iface); iface_copy = g_strdup (device->iface); @@ -647,13 +647,13 @@ nm_ip6_device_new (NMIP6Manager *manager, const char *iface) device = g_slice_new0 (NMIP6Device); if (!device) { - nm_warning ("%s: Out of memory creating IP6 addrconf object.", iface); + nm_log_err (LOGD_IP6, "(%s): out of memory creating IP6 addrconf object.", iface); return NULL; } device->iface = g_strdup (iface); if (!device->iface) { - nm_warning ("%s: Out of memory creating IP6 addrconf object " + nm_log_err (LOGD_IP6, "(%s): out of memory creating IP6 addrconf object " "property 'iface'.", iface); goto error; @@ -662,7 +662,7 @@ nm_ip6_device_new (NMIP6Manager *manager, const char *iface) device->accept_ra_path = g_strdup_printf ("/proc/sys/net/ipv6/conf/%s/accept_ra", iface); if (!device->accept_ra_path) { - nm_warning ("%s: Out of memory creating IP6 addrconf object " + nm_log_err (LOGD_IP6, "(%s): out of memory creating IP6 addrconf object " "property 'accept_ra_path'.", iface); goto error; @@ -679,10 +679,10 @@ nm_ip6_device_new (NMIP6Manager *manager, const char *iface) * device is taken down. */ if (!g_file_get_contents (device->accept_ra_path, &contents, NULL, &error)) { - nm_warning ("%s: error reading %s: (%d) %s", - iface, device->accept_ra_path, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_IP6, "(%s): error reading %s: (%d) %s", + iface, device->accept_ra_path, + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); g_clear_error (&error); } else { long int tmp; @@ -755,7 +755,7 @@ nm_ip6_manager_begin_addrconf (NMIP6Manager *manager, device = (NMIP6Device *) g_hash_table_lookup (priv->devices_by_iface, iface); g_return_if_fail (device != NULL); - nm_info ("Activation (%s) Beginning IP6 addrconf.", iface); + nm_log_info (LOGD_IP6, "Activation (%s) Beginning IP6 addrconf.", iface); device->addrconf_complete = FALSE; @@ -818,13 +818,13 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, device = (NMIP6Device *) g_hash_table_lookup (priv->devices_by_iface, iface); if (!device) { - nm_warning ("Device '%s' addrconf not started.", iface); + nm_log_warn (LOGD_IP6, "(%s): addrconf not started.", iface); return NULL; } config = nm_ip6_config_new (); if (!config) { - nm_warning ("%s: Out of memory creating IP6 config object.", + nm_log_err (LOGD_IP6, "(%s): out of memory creating IP6 config object.", iface); return NULL; } diff --git a/src/ip6-manager/nm-netlink-listener.c b/src/ip6-manager/nm-netlink-listener.c index ea7462c308..55c4d76ad4 100644 --- a/src/ip6-manager/nm-netlink-listener.c +++ b/src/ip6-manager/nm-netlink-listener.c @@ -45,7 +45,6 @@ #include "NetworkManager.h" #include "nm-system.h" #include "nm-netlink-listener.h" -#include "nm-utils.h" #include "nm-marshal.h" #include "nm-netlink.h" From 8e7a25114b68d87e9fc562fc4292ab8b5c82b963 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:55:30 -0700 Subject: [PATCH 035/105] logging: clarify some log domains --- src/logging/nm-logging.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index 6511289e21..953883bf3a 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -27,7 +27,7 @@ /* Log domains */ enum { LOGD_NONE = 0x00000000, - LOGD_HW = 0x00000001, + LOGD_HW = 0x00000001, /* Hardware detection and info */ LOGD_RFKILL = 0x00000002, LOGD_ETHER = 0x00000004, LOGD_WIFI = 0x00000008, @@ -42,11 +42,11 @@ enum { LOGD_AUTOIP4 = 0x00001000, LOGD_DNS = 0x00002000, LOGD_VPN = 0x00004000, - LOGD_SHARING = 0x00008000, - LOGD_SUPPLICANT = 0x00010000, - LOGD_USER_SET = 0x00020000, - LOGD_SYS_SET = 0x00040000, - LOGD_SUSPEND = 0x00080000, + LOGD_SHARING = 0x00008000, /* Connection sharing/dnsmasq */ + LOGD_SUPPLICANT = 0x00010000, /* WiFi and 802.1x */ + LOGD_USER_SET = 0x00020000, /* User settings */ + LOGD_SYS_SET = 0x00040000, /* System settings */ + LOGD_SUSPEND = 0x00080000, /* Suspend/Resume */ LOGD_CORE = 0x00100000, /* Core daemon and policy stuff */ LOGD_DEVICE = 0x00200000, /* Device state and activation */ }; From 3520fb273d8323f469f90dfbb1afe780f55181cd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 10:57:39 -0700 Subject: [PATCH 036/105] core: update policy logging --- src/nm-policy.c | 63 +++++++++++++++--------------- src/nm-properties-changed-signal.c | 2 +- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/nm-policy.c b/src/nm-policy.c index b1d3ba6ec7..7159eafb57 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -29,7 +29,7 @@ #include "NetworkManagerUtils.h" #include "nm-wifi-ap.h" #include "nm-activation-request.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-wifi.h" @@ -269,9 +269,9 @@ update_etc_hosts (const char *hostname, gboolean *out_changed) g_return_val_if_fail (out_changed != NULL, FALSE); if (!g_file_get_contents (SYSCONFDIR "/hosts", &contents, &contents_len, &error)) { - nm_warning ("%s: couldn't read " SYSCONFDIR "/hosts: (%d) %s", - __func__, error ? error->code : 0, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", + error ? error->code : 0, + (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); return FALSE; } @@ -287,14 +287,14 @@ update_etc_hosts (const char *hostname, gboolean *out_changed) g_free (contents); if (new_contents) { - nm_info ("Updating /etc/hosts with new system hostname"); + nm_log_info (LOGD_DNS, "Updating /etc/hosts with new system hostname"); g_clear_error (&error); /* And actually update /etc/hosts */ if (!g_file_set_contents (SYSCONFDIR "/hosts", new_contents->str, -1, &error)) { - nm_warning ("%s: couldn't update " SYSCONFDIR "/hosts: (%d) %s", - __func__, error ? error->code : 0, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_DNS, "couldn't update " SYSCONFDIR "/hosts: (%d) %s", + error ? error->code : 0, + (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); } else { success = TRUE; @@ -306,8 +306,8 @@ update_etc_hosts (const char *hostname, gboolean *out_changed) /* No change required */ success = TRUE; } else { - nm_warning ("%s: couldn't read " SYSCONFDIR "/hosts: (%d) %s", - __func__, error->code, error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_DNS, "couldn't read " SYSCONFDIR "/hosts: (%d) %s", + error->code, error->message ? error->message : "(unknown)"); g_clear_error (&error); } @@ -326,8 +326,8 @@ set_system_hostname (const char *new_hostname, const char *msg) errno = 0; ret = gethostname (old_hostname, HOST_NAME_MAX); if (ret != 0) { - nm_warning ("%s: couldn't get the system hostname: (%d) %s", - __func__, errno, strerror (errno)); + nm_log_warn (LOGD_DNS, "couldn't get the system hostname: (%d) %s", + errno, strerror (errno)); } else { /* Don't set the hostname if it isn't actually changing */ if ( (new_hostname && !strcmp (old_hostname, new_hostname)) @@ -336,11 +336,11 @@ set_system_hostname (const char *new_hostname, const char *msg) } if (set_hostname) { - nm_info ("Setting system hostname to '%s' (%s)", name, msg); + nm_log_info (LOGD_DNS, "Setting system hostname to '%s' (%s)", name, msg); ret = sethostname (name, strlen (name)); if (ret != 0) { - nm_warning ("%s: couldn't set the system hostname to '%s': (%d) %s", - __func__, name, errno, strerror (errno)); + nm_log_warn (LOGD_DNS, "couldn't set the system hostname to '%s': (%d) %s", + name, errno, strerror (errno)); return; } } @@ -353,11 +353,11 @@ set_system_hostname (const char *new_hostname, const char *msg) */ if (!update_etc_hosts (name, &changed)) { /* error updating /etc/hosts; fallback to localhost.localdomain */ - nm_info ("Setting system hostname to '" FALLBACK_HOSTNAME "' (error updating /etc/hosts)"); + nm_log_info (LOGD_DNS, "Setting system hostname to '" FALLBACK_HOSTNAME "' (error updating /etc/hosts)"); ret = sethostname (FALLBACK_HOSTNAME, strlen (FALLBACK_HOSTNAME)); if (ret != 0) { - nm_warning ("%s: couldn't set the fallback system hostname (%s): (%d) %s", - __func__, FALLBACK_HOSTNAME, errno, strerror (errno)); + nm_log_warn (LOGD_DNS, "couldn't set the fallback system hostname (%s): (%d) %s", + FALLBACK_HOSTNAME, errno, strerror (errno)); } } @@ -450,8 +450,8 @@ update_system_hostname (NMPolicy *policy, NMDevice *best) return; } } - nm_warning ("%s: DHCP-provided hostname '%s' looks invalid; ignoring it", - __func__, dhcp4_hostname); + nm_log_warn (LOGD_DNS, "DHCP-provided hostname '%s' looks invalid; ignoring it", + dhcp4_hostname); } } @@ -563,8 +563,8 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update) } if (!ip_iface || !ip4_config) { - nm_warning ("%s: couldn't determine IP interface (%p) or IPv4 config (%p)!", - __func__, ip_iface, ip4_config); + nm_log_warn (LOGD_CORE, "couldn't determine IP interface (%p) or IPv4 config (%p)!", + ip_iface, ip4_config); goto out; } @@ -597,10 +597,11 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update) s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION); connection_id = s_con ? nm_setting_connection_get_id (s_con) : NULL; - if (connection_id) - nm_info ("Policy set '%s' (%s) as default for routing and DNS.", connection_id, ip_iface); - else - nm_info ("Policy set (%s) as default for routing and DNS.", ip_iface); + if (connection_id) { + nm_log_info (LOGD_CORE, "Policy set '%s' (%s) as default for routing and DNS.", connection_id, ip_iface); + } else { + nm_log_info (LOGD_CORE, "Policy set (%s) as default for routing and DNS.", ip_iface); + } out: /* Update the system hostname */ @@ -669,8 +670,8 @@ auto_activate_device (gpointer user_data) s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (best_connection, NM_TYPE_SETTING_CONNECTION)); g_assert (s_con); - nm_warning ("Connection '%s' auto-activation failed: (%d) %s", - nm_setting_connection_get_id (s_con), error->code, error->message); + nm_log_info (LOGD_DEVICE, "Connection '%s' auto-activation failed: (%d) %s", + nm_setting_connection_get_id (s_con), error->code, error->message); g_error_free (error); } } @@ -797,7 +798,7 @@ device_state_changed (NMDevice *device, */ if (connection && IS_ACTIVATING_STATE (old_state)) { g_object_set_data (G_OBJECT (connection), INVALID_TAG, GUINT_TO_POINTER (TRUE)); - nm_info ("Marking connection '%s' invalid.", get_connection_id (connection)); + nm_log_info (LOGD_DEVICE, "Marking connection '%s' invalid.", get_connection_id (connection)); nm_connection_clear_secrets (connection); } schedule_activate_check (policy, device, 3); @@ -988,8 +989,8 @@ connection_removed (NMManager *manager, GError *error = NULL; if (!nm_manager_deactivate_connection (manager, path, NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, &error)) { - nm_warning ("Connection '%s' disappeared, but error deactivating it: (%d) %s", - nm_setting_connection_get_id (s_con), error->code, error->message); + nm_log_warn (LOGD_DEVICE, "Connection '%s' disappeared, but error deactivating it: (%d) %s", + nm_setting_connection_get_id (s_con), error->code, error->message); g_error_free (error); } g_free (path); diff --git a/src/nm-properties-changed-signal.c b/src/nm-properties-changed-signal.c index 8d6c3a4a22..4a9db8afa9 100644 --- a/src/nm-properties-changed-signal.c +++ b/src/nm-properties-changed-signal.c @@ -106,7 +106,7 @@ properties_changed (gpointer data) { char buf[2048] = { 0, }; g_hash_table_foreach (info->hash, add_to_string, &buf); - g_message ("%s: %s -> %s", __func__, G_OBJECT_TYPE_NAME (object), buf); + nm_log_dbg (LOGD_CORE, "%s -> %s", G_OBJECT_TYPE_NAME (object), buf); } #endif From b2f0c0fc6516c15b7e082030693777abb9a90aa9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:07:19 -0700 Subject: [PATCH 037/105] bt: update logging --- src/nm-device-bt.c | 55 +++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index c60afe7d14..8cf179e1ed 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -28,7 +28,7 @@ #include "nm-device-bt.h" #include "nm-device-interface.h" #include "nm-device-private.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "ppp-manager/nm-ppp-manager.h" #include "nm-properties-changed-signal.h" @@ -366,10 +366,11 @@ modem_ip4_config_result (NMModem *self, g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG); if (error) { - nm_warning ("%s: retrieving IP4 configuration failed: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB | LOGD_IP4 | LOGD_BT, + "(%s): retrieving IP4 configuration failed: (%d) %s", + nm_device_get_ip_iface (device), + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); } else { @@ -483,14 +484,16 @@ nm_device_bt_modem_added (NMDeviceBt *self, */ state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); if (state != NM_DEVICE_STATE_CONFIG) { - nm_warning ("(%s): modem found but device not in correct state (%d)", - nm_device_get_iface (NM_DEVICE (self)), - nm_device_get_state (NM_DEVICE (self))); + nm_log_warn (LOGD_BT | LOGD_MB, + "(%s): modem found but device not in correct state (%d)", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_state (NM_DEVICE (self))); return TRUE; } - nm_info ("Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) modem found.", - nm_device_get_iface (NM_DEVICE (self))); + nm_log_info (LOGD_BT | LOGD_MB, + "Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) modem found.", + nm_device_get_iface (NM_DEVICE (self))); if (priv->modem) { g_warn_if_reached (); @@ -561,11 +564,11 @@ check_connect_continue (NMDeviceBt *self) if (!priv->connected || !priv->have_iface) return; - nm_info ("Activation (%s %s/bluetooth) Stage 2 of 5 (Device Configure) " - "successful. Will connect via %s.", - nm_device_get_iface (device), - nm_device_get_ip_iface (device), - dun ? "DUN" : (pan ? "PAN" : "unknown")); + nm_log_info (LOGD_BT, "Activation (%s %s/bluetooth) Stage 2 of 5 (Device Configure) " + "successful. Will connect via %s.", + nm_device_get_iface (device), + nm_device_get_ip_iface (device), + dun ? "DUN" : (pan ? "PAN" : "unknown")); if (pan) { /* Bluez says we're connected now. Start IP config. */ @@ -576,9 +579,9 @@ check_connect_continue (NMDeviceBt *self) g_source_remove (priv->timeout_id); priv->timeout_id = g_timeout_add_seconds (20, modem_find_timeout, self); - nm_info ("Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) " - "waiting for modem to appear.", - nm_device_get_iface (device)); + nm_log_info (LOGD_BT | LOGD_MB, "Activation (%s/bluetooth) Stage 2 of 5 (Device Configure) " + "waiting for modem to appear.", + nm_device_get_iface (device)); } else g_assert_not_reached (); } @@ -596,8 +599,8 @@ bluez_connect_cb (DBusGProxy *proxy, if (dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_STRING, &device, G_TYPE_INVALID) == FALSE) { - nm_warning ("Error connecting with bluez: %s", - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_BT, "Error connecting with bluez: %s", + error && error->message ? error->message : "(unknown)"); g_clear_error (&error); nm_device_state_changed (NM_DEVICE (self), @@ -607,7 +610,7 @@ bluez_connect_cb (DBusGProxy *proxy, } if (!device || !strlen (device)) { - nm_warning ("Invalid network device returned by bluez"); + nm_log_warn (LOGD_BT, "Invalid network device returned by bluez"); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, @@ -655,11 +658,13 @@ bluez_property_changed (DBusGProxy *proxy, /* Bluez says we're disconnected from the device. Suck. */ if (nm_device_is_activating (device)) { - nm_info ("Activation (%s/bluetooth): bluetooth link disconnected.", - nm_device_get_iface (device)); + nm_log_info (LOGD_BT, + "Activation (%s/bluetooth): bluetooth link disconnected.", + nm_device_get_iface (device)); fail = TRUE; } else if (state == NM_DEVICE_STATE_ACTIVATED) { - nm_info ("%s: bluetooth link disconnected.", nm_device_get_iface (device)); + nm_log_info (LOGD_BT, "(%s): bluetooth link disconnected.", + nm_device_get_iface (device)); fail = TRUE; } From 4bc59be464b5b617c4da461768a3ac54fc8797dd Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:08:43 -0700 Subject: [PATCH 038/105] mobile-broadband: update logging --- src/nm-device-modem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c index fd6b044c3f..b13ce6c3bb 100644 --- a/src/nm-device-modem.c +++ b/src/nm-device-modem.c @@ -26,6 +26,7 @@ #include "nm-device-private.h" #include "nm-properties-changed-signal.h" #include "nm-marshal.h" +#include "nm-logging.h" static void device_interface_init (NMDeviceInterface *iface_class); @@ -131,10 +132,9 @@ modem_ip4_config_result (NMModem *self, g_return_if_fail (state == NM_DEVICE_STATE_IP_CONFIG); if (error) { - g_warning ("%s: retrieving IP4 configuration failed: (%d) %s", - __func__, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_warn (LOGD_MB | LOGD_IP4, "retrieving IP4 configuration failed: (%d) %s", + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE); } else { From 75fa7b804ddd2e670e839817b76ee7490f6d1359 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:13:25 -0700 Subject: [PATCH 039/105] logging: add OLPC mesh log domain --- src/logging/nm-logging.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index 953883bf3a..1b34614c7e 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -49,6 +49,7 @@ enum { LOGD_SUSPEND = 0x00080000, /* Suspend/Resume */ LOGD_CORE = 0x00100000, /* Core daemon and policy stuff */ LOGD_DEVICE = 0x00200000, /* Device state and activation */ + LOGD_OLPC_MESH = 0x00400000, }; #define LOGD_DHCP (LOGD_DHCP4 | LOGD_DHCP6) From 796671d424dad653e840a2f355badbc21c1ae21a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:22:41 -0700 Subject: [PATCH 040/105] olpc-mesh: update logging --- src/nm-device-olpc-mesh.c | 59 ++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 807db94bd3..41fc83acd7 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2008 Red Hat, Inc. + * (C) Copyright 2005 - 2010 Red Hat, Inc. * (C) Copyright 2008 Collabora Ltd. * (C) Copyright 2009 One Laptop per Child */ @@ -42,6 +42,7 @@ #include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" +#include "nm-logging.h" #include "NetworkManagerUtils.h" #include "nm-activation-request.h" #include "nm-properties-changed-signal.h" @@ -157,7 +158,7 @@ real_get_generic_capabilities (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_OLPC_MESH, "couldn't open control socket."); goto out; } @@ -168,13 +169,14 @@ real_get_generic_capabilities (NMDevice *dev) wrq.u.data.length = sizeof (struct iw_range); if (ioctl (fd, SIOCGIWRANGE, &wrq) < 0) { - nm_warning ("couldn't get driver range information."); + nm_log_warn (LOGD_OLPC_MESH, "couldn't get driver range information."); goto out; } if ((wrq.u.data.length < 300) || (range.we_version_compiled < 16)) { - nm_warning ("%s: driver's Wireless Extensions version (%d) is too old.", - iface, range.we_version_compiled); + nm_log_warn (LOGD_OLPC_MESH, + "(%s): driver's Wireless Extensions version (%d) is too old.", + iface, range.we_version_compiled); goto out; } else { caps |= NM_DEVICE_CAP_NM_SUPPORTED; @@ -404,7 +406,7 @@ create_socket_with_request (NMDevice *self, struct iwreq *req) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno); return -1; } @@ -430,8 +432,8 @@ nm_device_olpc_mesh_get_channel (NMDeviceOlpcMesh *self) return 0; if ((ioctl (sk, SIOCGIWFREQ, &req)) != 0) { - nm_warning ("%s: failed to get channel (errno: %d))", - nm_device_get_iface (NM_DEVICE (self)), errno); + nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to get channel (errno: %d)", + nm_device_get_iface (NM_DEVICE (self)), errno); goto out; } @@ -469,10 +471,10 @@ nm_device_olpc_mesh_set_channel (NMDeviceOlpcMesh *self, guint32 channel) req.u.freq.m = channel; } - if (ioctl (sk, SIOCSIWFREQ, &req) != 0) - nm_warning ("%s: failed to set to channel %d (errno: %d))", - nm_device_get_iface (NM_DEVICE (self)), channel, errno); - else + if (ioctl (sk, SIOCSIWFREQ, &req) != 0) { + nm_log_warn (LOGD_OLPC_MESH, "(%s): failed to set to channel %d (errno: %d)", + nm_device_get_iface (NM_DEVICE (self)), channel, errno); + } else g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL); close (sk); @@ -492,7 +494,7 @@ nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_OLPC_MESH, "Couldn't create socket: %d.", errno); return; } @@ -524,9 +526,10 @@ nm_device_olpc_mesh_set_ssid (NMDeviceOlpcMesh *self, const GByteArray * ssid) if (ioctl (sk, SIOCSIWESSID, &wrq) < 0) { if (errno != ENODEV) { - nm_warning ("error setting SSID to '%s' for device %s: %s", + nm_log_err (LOGD_OLPC_MESH, "(%s): error setting SSID to '%s': %s", + iface, ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(null)", - iface, strerror (errno)); + strerror (errno)); } } @@ -554,7 +557,7 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("could not open control socket."); + nm_log_warn (LOGD_OLPC_MESH, "could not open control socket."); return; } @@ -562,8 +565,8 @@ real_update_hw_address (NMDevice *dev) strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); ret = ioctl (fd, SIOCGIFHWADDR, &req); if (ret) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_warn (LOGD_OLPC_MESH, "(%s): error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -585,17 +588,20 @@ real_act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *reason) /* disconnect companion device, if it is connected */ if (nm_device_get_act_request (NM_DEVICE (priv->companion))) { - nm_warning ("disconnecting companion device"); + nm_log_info (LOGD_OLPC_MESH, "(%s): disconnecting companion device %s", + nm_device_get_iface (dev), + nm_device_get_iface (priv->companion)); /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (priv->companion), NM_DEVICE_STATE_DISCONNECTED, NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED); - nm_warning ("companion disconnected"); + nm_log_info (LOGD_OLPC_MESH, "(%s): companion %s disconnected", + nm_device_get_iface (dev), + nm_device_get_iface (priv->companion)); } - /* wait with continuing configuration untill the companion device is done - * scanning */ + /* wait with continuing configuration untill the companion device is done scanning */ g_object_get (priv->companion, "scanning", &scanning, NULL); if (scanning) { priv->stage1_waiting = TRUE; @@ -823,7 +829,8 @@ companion_state_changed_cb (NMDeviceWifi *companion, || state > NM_DEVICE_STATE_ACTIVATED) return; - nm_debug ("disconnecting mesh due to companion connectivity"); + nm_log_dbg (LOGD_OLPC_MESH, "(%s): disconnecting mesh due to companion connectivity", + nm_device_get_iface (NM_DEVICE (self))); /* FIXME: VPN stuff here is a bug; but we can't really change API now... */ nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED, @@ -887,9 +894,9 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); - nm_info ("(%s): found companion WiFi device %s", - nm_device_get_iface (NM_DEVICE (self)), - nm_device_get_iface (other)); + nm_log_info (LOGD_OLPC_MESH, "(%s): found companion WiFi device %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_device_get_iface (other)); g_signal_connect (G_OBJECT (other), "state-changed", G_CALLBACK (companion_state_changed_cb), self); From da987805063e089d9af6ac2785f8342daf42cb04 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:31:02 -0700 Subject: [PATCH 041/105] system-settings: update logging --- src/system-settings/Makefile.am | 2 ++ src/system-settings/nm-inotify-helper.c | 5 ++-- src/system-settings/nm-sysconfig-settings.c | 33 +++++++++++---------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/system-settings/Makefile.am b/src/system-settings/Makefile.am index baec81412a..3b616b9084 100644 --- a/src/system-settings/Makefile.am +++ b/src/system-settings/Makefile.am @@ -2,6 +2,7 @@ INCLUDES = -I${top_srcdir} \ -I${top_srcdir}/include \ -I${top_srcdir}/libnm-util \ -I${top_srcdir}/libnm-glib \ + -I${top_srcdir}/src/logging \ -I${top_srcdir}/src \ -I${top_builddir}/marshallers @@ -44,6 +45,7 @@ libsystem_settings_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ $(top_builddir)/libnm-glib/libnm-glib.la \ $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ $(DBUS_LIBS) \ $(GLIB_LIBS) \ $(GMODULE_LIBS) \ diff --git a/src/system-settings/nm-inotify-helper.c b/src/system-settings/nm-inotify-helper.c index 589dbd6917..0ee168e542 100644 --- a/src/system-settings/nm-inotify-helper.c +++ b/src/system-settings/nm-inotify-helper.c @@ -25,6 +25,7 @@ #include "nm-marshal.h" #include "nm-inotify-helper.h" +#include "nm-logging.h" G_DEFINE_TYPE (NMInotifyHelper, nm_inotify_helper, G_TYPE_OBJECT) @@ -122,14 +123,14 @@ init_inotify (NMInotifyHelper *self) priv->ifd = inotify_init (); if (priv->ifd == -1) { - g_warning ("%s: couldn't initialize inotify", __func__); + nm_log_warn (LOGD_SYS_SET, "couldn't initialize inotify"); return FALSE; } /* Watch the inotify descriptor for file/directory change events */ channel = g_io_channel_unix_new (priv->ifd); if (!channel) { - g_warning ("%s: couldn't create new GIOChannel", __func__); + nm_log_warn (LOGD_SYS_SET, "couldn't create new GIOChannel"); close (priv->ifd); priv->ifd = -1; return FALSE; diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index 53369067dc..b120953a3e 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -19,7 +19,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2009 Red Hat, Inc. + * (C) Copyright 2007 - 2010 Red Hat, Inc. * (C) Copyright 2008 Novell, Inc. */ @@ -57,8 +57,8 @@ #include "nm-sysconfig-connection.h" #include "nm-polkit-helpers.h" #include "nm-system-config-error.h" -#include "nm-utils.h" #include "nm-default-wired-connection.h" +#include "nm-logging.h" #define CONFIG_KEY_NO_AUTO_DEFAULT "no-auto-default" @@ -368,7 +368,7 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, NULL); - g_message ("Loaded plugin %s: %s", pname, pinfo); + nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); g_free (pname); g_free (pinfo); } @@ -859,11 +859,11 @@ permission_call_done (GObject *object, GAsyncResult *result, gpointer user_data) &error); /* Some random error happened */ if (error) { - g_warning ("%s.%d (%s): error checking '%s' permission: (%d) %s", - __FILE__, __LINE__, __func__, - call->pk_action, - error ? error->code : -1, - error && error->message ? error->message : "(unknown)"); + nm_log_err (LOGD_SYS_SET, "error checking '%s' permission: (%d) %s", + __FILE__, __LINE__, __func__, + call->pk_action, + error ? error->code : -1, + error && error->message ? error->message : "(unknown)"); if (error) g_error_free (error); } else { @@ -1064,7 +1064,7 @@ is_mac_auto_wired_blacklisted (NMSysconfigSettings *self, const GByteArray *mac) config = g_key_file_new (); if (!config) { - g_warning ("%s: not enough memory to load config file.", __func__); + nm_log_warn (LOGD_SYS_SET, "not enough memory to load config file."); return FALSE; } @@ -1216,14 +1216,14 @@ default_wired_try_update (NMDefaultWiredConnection *wired, g_object_set_data (G_OBJECT (nm_default_wired_connection_get_device (wired)), DEFAULT_WIRED_TAG, NULL); - g_message ("Saved default wired connection '%s' to persistent storage", id); + nm_log_info (LOGD_SYS_SET, "Saved default wired connection '%s' to persistent storage", id); return FALSE; } - g_warning ("%s: couldn't save default wired connection '%s': %d / %s", - __func__, id, - error ? error->code : -1, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_SYS_SET, "couldn't save default wired connection '%s': %d / %s", + id, + error ? error->code : -1, + (error && error->message) ? error->message : "(unknown)"); /* If there was an error, don't destroy the default wired connection, * but add it back to the system settings service. Connection is already @@ -1275,7 +1275,8 @@ nm_sysconfig_settings_device_added (NMSysconfigSettings *self, NMDevice *device) id = nm_setting_connection_get_id (s_con); g_assert (id); - g_message ("Added default wired connection '%s' for %s", id, nm_device_get_udi (device)); + nm_log_info (LOGD_SYS_SET, "Added default wired connection '%s' for %s", + id, nm_device_get_udi (device)); g_signal_connect (wired, "try-update", (GCallback) default_wired_try_update, self); g_signal_connect (wired, "deleted", (GCallback) default_wired_deleted, self); @@ -1507,6 +1508,6 @@ nm_sysconfig_settings_init (NMSysconfigSettings *self) G_CALLBACK (pk_authority_changed_cb), self); } else - g_warning ("%s: failed to create PolicyKit authority.", __func__); + nm_log_warn (LOGD_SYS_SET, "failed to create PolicyKit authority."); } From adc9ef60fc014e91111c5f80aeb879f9e451c928 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:31:38 -0700 Subject: [PATCH 042/105] logging: move config file logging options into their own section --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 142c1af1f8..1974ec19b7 100644 --- a/src/main.c +++ b/src/main.c @@ -322,8 +322,8 @@ parse_config_file (const char *filename, *dhcp_client = g_key_file_get_value (config, "main", "dhcp", NULL); - *log_level = g_key_file_get_value (config, "main", "log-level", NULL); - *log_domains = g_key_file_get_value (config, "main", "log-domains", NULL); + *log_level = g_key_file_get_value (config, "logging", "level", NULL); + *log_domains = g_key_file_get_value (config, "logging", "domains", NULL); g_key_file_free (config); return TRUE; From ce8631eea2c2b266a5f301d17a548e3d182d1f64 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:36:02 -0700 Subject: [PATCH 043/105] core: update dbus-manager logging --- src/nm-dbus-manager.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c index 37039f1872..9b621b42ba 100644 --- a/src/nm-dbus-manager.c +++ b/src/nm-dbus-manager.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2006 - 2008 Red Hat, Inc. + * Copyright (C) 2006 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -29,7 +29,7 @@ #include #include #include -#include "nm-utils.h" +#include "nm-logging.h" enum { DBUS_CONNECTION_CHANGED = 0, @@ -158,7 +158,7 @@ nm_dbus_manager_reconnect (gpointer user_data) if (nm_dbus_manager_init_bus (self)) { if (nm_dbus_manager_start_service (self)) { - nm_info ("reconnected to the system bus."); + nm_log_info (LOGD_CORE, "reconnected to the system bus."); g_signal_emit (self, signals[DBUS_CONNECTION_CHANGED], 0, priv->connection); priv->reconnect_id = 0; @@ -223,8 +223,8 @@ nm_dbus_manager_name_has_owner (NMDBusManager *self, G_TYPE_INVALID, G_TYPE_BOOLEAN, &has_owner, G_TYPE_INVALID)) { - nm_warning ("NameHasOwner request failed: %s", - (err && err->message) ? err->message : "(unknown)"); + nm_log_warn (LOGD_CORE, "NameHasOwner request failed: %s", + (err && err->message) ? err->message : "(unknown)"); g_clear_error (&err); } @@ -248,7 +248,7 @@ destroy_cb (DBusGProxy *proxy, gpointer user_data) NMDBusManager *self = NM_DBUS_MANAGER (user_data); /* Clean up existing connection */ - nm_info ("disconnected by the system bus."); + nm_log_warn (LOGD_CORE, "disconnected by the system bus."); NM_DBUS_MANAGER_GET_PRIVATE (self)->proxy = NULL; nm_dbus_manager_cleanup (self, FALSE); @@ -265,7 +265,7 @@ nm_dbus_manager_init_bus (NMDBusManager *self) GError *err = NULL; if (priv->connection) { - nm_warning ("DBus Manager already has a valid connection."); + nm_log_warn (LOGD_CORE, "DBus Manager already has a valid connection."); return FALSE; } @@ -273,7 +273,7 @@ nm_dbus_manager_init_bus (NMDBusManager *self) priv->g_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err); if (!priv->g_connection) { - nm_warning ("Could not get the system bus. Make sure " + nm_log_err (LOGD_CORE, "Could not get the system bus. Make sure " "the message bus daemon is running! Message: %s", err->message); g_error_free (err); @@ -317,7 +317,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) priv = NM_DBUS_MANAGER_GET_PRIVATE (self); if (priv->started) { - nm_warning ("Service has already started."); + nm_log_err (LOGD_CORE, "Service has already started."); return FALSE; } @@ -327,7 +327,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID)) { - nm_warning ("Could not acquire the NetworkManager service.\n" + nm_log_err (LOGD_CORE, "Could not acquire the NetworkManager service.\n" " Error: '%s'", (err && err->message) ? err->message : "(unknown)"); g_error_free (err); @@ -335,7 +335,7 @@ nm_dbus_manager_start_service (NMDBusManager *self) } if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - nm_warning ("Could not acquire the NetworkManager service as it is already taken."); + nm_log_err (LOGD_CORE, "Could not acquire the NetworkManager service as it is already taken."); return FALSE; } @@ -345,15 +345,15 @@ nm_dbus_manager_start_service (NMDBusManager *self) G_TYPE_INVALID, G_TYPE_UINT, &result, G_TYPE_INVALID)) { - g_warning ("Could not acquire the NetworkManagerSystemSettings service.\n" - " Message: '%s'", err->message); + nm_log_warn (LOGD_CORE, "Could not acquire the NetworkManagerSystemSettings service.\n" + " Message: '%s'", err->message); g_error_free (err); return FALSE; } if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { - g_warning ("Could not acquire the NetworkManagerSystemSettings service " - "as it is already taken."); + nm_log_warn (LOGD_CORE, "Could not acquire the NetworkManagerSystemSettings service " + "as it is already taken."); return FALSE; } From acf8f7f53115d2e59cff6a73d73230c7d97531a3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 11:36:38 -0700 Subject: [PATCH 044/105] core: update activation request logging --- src/nm-activation-request.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index f85c12d610..1335c35e46 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2007 - 2008 Novell, Inc. */ @@ -27,7 +27,7 @@ #include "nm-activation-request.h" #include "nm-marshal.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-setting-wireless-security.h" #include "nm-setting-8021x.h" #include "nm-dbus-manager.h" @@ -418,9 +418,9 @@ secrets_update_setting (NMSecretsProviderInterface *interface, nm_connection_add_setting (priv->connection, setting); else { if (!nm_connection_update_secrets (priv->connection, setting_name, new, &error)) { - nm_warning ("Failed to update connection secrets: %d %s", - error ? error->code : -1, - error && error->message ? error->message : "(none)"); + nm_log_warn (LOGD_DEVICE, "Failed to update connection secrets: %d %s", + error ? error->code : -1, + error && error->message ? error->message : "(none)"); g_clear_error (&error); } } @@ -591,15 +591,17 @@ nm_act_request_set_shared (NMActRequest *req, gboolean shared) int status; GError *error = NULL; - nm_info ("Executing: %s", cmd); + nm_log_info (LOGD_SHARING, "Executing: %s", cmd); if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_info ("Error executing command: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "(unknown)"); + nm_log_warn (LOGD_SHARING, "Error executing command: (%d) %s", + error ? error->code : -1, + (error && error->message) ? error->message : "(unknown)"); g_clear_error (&error); - } else if (WEXITSTATUS (status)) - nm_info ("** Command returned exit status %d.", WEXITSTATUS (status)); + } else if (WEXITSTATUS (status)) { + nm_log_warn (LOGD_SHARING, "** Command returned exit status %d.", + WEXITSTATUS (status)); + } } g_free (cmd); if (argv) From 3f1604f3f0a488261d2a505766efb6e9c114e90d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 12:27:34 -0700 Subject: [PATCH 045/105] system-settings: update logging --- src/system-settings/nm-sysconfig-connection.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system-settings/nm-sysconfig-connection.c b/src/system-settings/nm-sysconfig-connection.c index 7d6074c63d..09cec4000f 100644 --- a/src/system-settings/nm-sysconfig-connection.c +++ b/src/system-settings/nm-sysconfig-connection.c @@ -28,6 +28,7 @@ #include "nm-settings-connection-interface.h" #include "nm-settings-interface.h" #include "nm-polkit-helpers.h" +#include "nm-logging.h" static void settings_connection_interface_init (NMSettingsConnectionInterface *klass); @@ -613,8 +614,9 @@ nm_sysconfig_connection_init (NMSysconfigConnection *self) NMSysconfigConnectionPrivate *priv = NM_SYSCONFIG_CONNECTION_GET_PRIVATE (self); priv->authority = polkit_authority_get (); - if (!priv->authority) - g_warning ("%s: error creating PolicyKit authority", __func__); + if (!priv->authority) { + nm_log_err (LOGD_SYS_SET, "%s: error creating PolicyKit authority"); + } } static void From 1f1a28ae20813df93912b771340f33c534257437 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 12:28:57 -0700 Subject: [PATCH 046/105] core: update logging in misc files --- src/NetworkManagerUtils.c | 9 +++++---- src/nm-active-connection.c | 5 +++-- src/nm-call-store.c | 9 +++++---- src/nm-netlink-monitor.c | 10 +++++----- src/nm-netlink.c | 12 ++++++------ src/nm-secrets-provider-interface.c | 6 +++--- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index 100ccd363d..4bd57d9944 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. */ @@ -28,6 +28,7 @@ #include "NetworkManagerUtils.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-device.h" #include "nm-device-wifi.h" #include "nm-device-ethernet.h" @@ -85,13 +86,13 @@ nm_spawn_process (const char *args) g_return_val_if_fail (args != NULL, -1); if (!g_shell_parse_argv (args, &num_args, &argv, &error)) { - nm_warning ("could not parse arguments for '%s': %s", args, error->message); + nm_log_warn (LOGD_CORE, "could not parse arguments for '%s': %s", args, error->message); g_error_free (error); return -1; } if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, &error)) { - nm_warning ("could not spawn process '%s': %s", args, error->message); + nm_log_warn (LOGD_CORE, "could not spawn process '%s': %s", args, error->message); g_error_free (error); } @@ -394,7 +395,7 @@ nm_utils_call_dispatcher (const char *action, NM_DISPATCHER_DBUS_PATH, NM_DISPATCHER_DBUS_IFACE); if (!proxy) { - nm_warning ("Error: could not get dispatcher proxy!"); + nm_log_err (LOGD_CORE, "could not get dispatcher proxy!"); g_object_unref (dbus_mgr); return; } diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 019b5c3fc0..4207e14504 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -15,13 +15,14 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include #include "nm-active-connection.h" #include "NetworkManager.h" #include "nm-active-connection-glue.h" +#include "nm-logging.h" char * nm_active_connection_get_next_object_path (void) @@ -54,7 +55,7 @@ nm_active_connection_scope_to_value (NMConnection *connection, GValue *value) g_value_set_string (value, NM_DBUS_SERVICE_USER_SETTINGS); break; default: - g_warning ("%s: unknown connection scope!", __func__); + nm_log_err (LOGD_CORE, "unknown connection scope!"); break; } } diff --git a/src/nm-call-store.c b/src/nm-call-store.c index 837edf023d..df400d0ff6 100644 --- a/src/nm-call-store.c +++ b/src/nm-call-store.c @@ -16,10 +16,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2007 Novell, Inc. + * Copyright (C) 2010 Red Hat, Inc. */ #include "nm-call-store.h" -#include "nm-utils.h" +#include "nm-logging.h" NMCallStore * nm_call_store_new (void) @@ -68,12 +69,12 @@ nm_call_store_remove (NMCallStore *store, call_ids_hash = g_hash_table_lookup (store, object); if (!call_ids_hash) { - nm_warning ("Trying to remove a non-existant call id."); + nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id."); return; } if (!g_hash_table_remove (call_ids_hash, call_id)) - nm_warning ("Trying to remove a non-existant call id."); + nm_log_warn (LOGD_CORE, "Trying to remove a non-existant call id."); if (g_hash_table_size (call_ids_hash) == 0) { g_hash_table_remove (store, object); @@ -162,7 +163,7 @@ nm_call_store_foreach (NMCallStore *store, call_ids_hash = g_hash_table_lookup (store, object); if (!call_ids_hash) { - nm_warning ("Object not in store"); + nm_log_warn (LOGD_CORE, "Object not in store"); return -1; } diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c index 04f87b4b1d..36cd99e2d0 100644 --- a/src/nm-netlink-monitor.c +++ b/src/nm-netlink-monitor.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2008 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * Copyright (C) 2005 Ray Strode * @@ -43,7 +43,7 @@ #include "NetworkManager.h" #include "nm-system.h" #include "nm-netlink-monitor.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "nm-netlink.h" @@ -407,9 +407,9 @@ deferred_emit_carrier_state (gpointer user_data) /* Update the link cache with latest state, and if there are no errors * emit the link states for all the interfaces in the cache. */ - if (nl_cache_refill (priv->nlh, priv->nlh_link_cache)) - nm_warning ("error updating link cache: %s", nl_geterror ()); - else { + if (nl_cache_refill (priv->nlh, priv->nlh_link_cache)) { + nm_log_err (LOGD_HW, "error updating link cache: %s", nl_geterror ()); + } else { nl_cache_foreach_filter (priv->nlh_link_cache, NULL, netlink_object_message_handler, diff --git a/src/nm-netlink.c b/src/nm-netlink.c index ad68790db1..c55c093ae8 100644 --- a/src/nm-netlink.c +++ b/src/nm-netlink.c @@ -21,7 +21,7 @@ #include "config.h" #include "nm-netlink.h" -#include "nm-utils.h" +#include "nm-logging.h" #include #include @@ -40,7 +40,7 @@ get_link_cache (void) nlh = nm_netlink_get_default_handle (); if (G_UNLIKELY (!nlh)) { - nm_warning ("couldn't allocate netlink handle."); + nm_log_err (LOGD_HW, "couldn't allocate netlink handle."); return NULL; } @@ -48,7 +48,7 @@ get_link_cache (void) link_cache = rtnl_link_alloc_cache (nlh); if (G_UNLIKELY (!link_cache)) { - nm_warning ("couldn't allocate netlink link cache: %s", nl_geterror ()); + nm_log_err (LOGD_HW, "couldn't allocate netlink link cache: %s", nl_geterror ()); return NULL; } @@ -71,12 +71,12 @@ nm_netlink_get_default_handle (void) cb = nl_cb_alloc(NL_CB_VERBOSE); def_nl_handle = nl_handle_alloc_cb (cb); if (!def_nl_handle) { - nm_warning ("couldn't allocate netlink handle."); + nm_log_err (LOGD_HW, "couldn't allocate netlink handle."); return NULL; } if (nl_connect (def_nl_handle, NETLINK_ROUTE) < 0) { - nm_error ("couldn't connect to netlink: %s", nl_geterror ()); + nm_log_err (LOGD_HW, "couldn't connect to netlink: %s", nl_geterror ()); return NULL; } @@ -123,7 +123,7 @@ nm_netlink_index_to_iface (int idx) buf = g_malloc0 (MAX_IFACE_LEN); if (buf == NULL) { - nm_warning ("Not enough memory to allocate interface name buffer."); + nm_log_warn (LOGD_HW, "Not enough memory to allocate interface name buffer."); return NULL; } diff --git a/src/nm-secrets-provider-interface.c b/src/nm-secrets-provider-interface.c index 9bbde7a394..47b8e57efa 100644 --- a/src/nm-secrets-provider-interface.c +++ b/src/nm-secrets-provider-interface.c @@ -25,7 +25,7 @@ #include #include -#include "nm-utils.h" +#include "nm-logging.h" static void nm_secrets_provider_interface_init (gpointer g_iface) @@ -108,7 +108,7 @@ nm_secrets_provider_interface_get_secrets (NMSecretsProviderInterface *self, connection, setting_name, request_new, caller, hint1, hint2, &success); if (!success) { - nm_warning ("failed to get connection secrets."); + nm_log_warn (LOGD_CORE, "failed to get connection secrets."); return FALSE; } @@ -193,7 +193,7 @@ nm_secrets_provider_interface_get_secrets_result (NMSecretsProviderInterface *se hash = g_hash_table_lookup (settings, name); if (!hash) { - nm_warning ("couldn't get setting secrets for '%s'", name); + nm_log_warn (LOGD_CORE, "couldn't get setting secrets for '%s'", name); continue; } From f636c5048d2cb35e3be04dd30c4410a4e846cc89 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 12:31:29 -0700 Subject: [PATCH 047/105] wifi: update logging for APs --- src/nm-wifi-ap.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c index f3365176ad..ba865cfbff 100644 --- a/src/nm-wifi-ap.c +++ b/src/nm-wifi-ap.c @@ -26,6 +26,7 @@ #include "nm-wifi-ap.h" #include "NetworkManagerUtils.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-dbus-manager.h" #include "wpa.h" #include "nm-properties-changed-signal.h" @@ -333,7 +334,7 @@ nm_ap_export_to_dbus (NMAccessPoint *ap) priv = NM_AP_GET_PRIVATE (ap); if (priv->dbus_path) { - nm_warning ("Tried to export AP %s twice.", priv->dbus_path); + nm_log_err (LOGD_CORE, "Tried to export AP %s twice.", priv->dbus_path); return; } @@ -700,21 +701,21 @@ nm_ap_print_self (NMAccessPoint *ap, priv = NM_AP_GET_PRIVATE (ap); - nm_info ("%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x " - "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld", - prefix, - priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", - ap, - priv->timestamp.tv_sec, - priv->flags, - priv->wpa_flags, - priv->rsn_flags, - MAC_ARG (priv->address.ether_addr_octet), - priv->strength, - priv->freq, - priv->max_bitrate, - priv->mode, - priv->last_seen); + nm_log_dbg (LOGD_WIFI_SCAN, "%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x " + "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld", + prefix, + priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", + ap, + priv->timestamp.tv_sec, + priv->flags, + priv->wpa_flags, + priv->rsn_flags, + MAC_ARG (priv->address.ether_addr_octet), + priv->strength, + priv->freq, + priv->max_bitrate, + priv->mode, + priv->last_seen); } const char * @@ -940,7 +941,7 @@ void nm_ap_set_mode (NMAccessPoint *ap, const NM80211Mode mode) g_object_notify (G_OBJECT (ap), NM_AP_MODE); } } else - nm_warning ("Invalid AP mode '%d'", mode); + nm_log_warn (LOGD_WIFI, "Invalid AP mode '%d'", mode); } From 058f1edb4055414d9a11e876b1e2f928cfad7528 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 12:31:39 -0700 Subject: [PATCH 048/105] core: update base device logging --- src/nm-device-interface.c | 6 +- src/nm-device.c | 230 ++++++++++++++++++++++---------------- 2 files changed, 137 insertions(+), 99 deletions(-) diff --git a/src/nm-device-interface.c b/src/nm-device-interface.c index 74ab9d2986..4040626c2b 100644 --- a/src/nm-device-interface.c +++ b/src/nm-device-interface.c @@ -22,7 +22,7 @@ #include "nm-marshal.h" #include "nm-setting-connection.h" #include "nm-device-interface.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-properties-changed-signal.h" #include "nm-rfkill.h" @@ -282,8 +282,8 @@ nm_device_interface_activate (NMDeviceInterface *device, g_assert (s_con); iface = nm_device_interface_get_iface (device); - nm_info ("Activation (%s) starting connection '%s'", iface, - nm_setting_connection_get_id (s_con)); + nm_log_info (LOGD_DEVICE, "Activation (%s) starting connection '%s'", iface, + nm_setting_connection_get_id (s_con)); g_free (iface); success = NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device, req, error); diff --git a/src/nm-device.c b/src/nm-device.c index 556cc187ed..716401a583 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -44,6 +44,7 @@ #include "nm-dbus-manager.h" #include "nm-named-manager.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-netlink.h" #include "nm-setting-ip4-config.h" #include "nm-setting-ip6-config.h" @@ -218,18 +219,18 @@ constructor (GType type, priv = NM_DEVICE_GET_PRIVATE (dev); if (!priv->udi) { - nm_warning ("No device udi provided, ignoring"); + nm_log_err (LOGD_DEVICE, "No device udi provided, ignoring"); goto error; } if (!priv->iface) { - nm_warning ("No device interface provided, ignoring"); + nm_log_err (LOGD_DEVICE, "No device interface provided, ignoring"); goto error; } priv->capabilities |= NM_DEVICE_GET_CLASS (dev)->get_generic_capabilities (dev); if (!(priv->capabilities & NM_DEVICE_CAP_NM_SUPPORTED)) { - nm_warning ("(%s): Device unsupported, ignoring.", priv->iface); + nm_log_warn (LOGD_DEVICE, "(%s): Device unsupported, ignoring.", priv->iface); goto error; } @@ -526,8 +527,9 @@ activation_source_schedule (NMDevice *self, GSourceFunc func, int family) act_source_func = &priv->act_source_func; } - if (*act_source_id) - nm_warning ("activation stage already scheduled"); + if (*act_source_id) { + nm_log_err (LOGD_DEVICE, "activation stage already scheduled"); + } /* Don't bother rescheduling the same function that's about to * run anyway. Fixes issues with crappy wireless drivers sending @@ -589,9 +591,10 @@ ip6_addrconf_complete (NMIP6Manager *ip6_manager, if ((state != NM_DEVICE_STATE_IP_CONFIG) || priv->dhcp6_client) return; - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) starting DHCPv6" - " as requested by IPv6 router...", - priv->iface); + nm_log_info (LOGD_DEVICE | LOGD_DHCP6, + "Activation (%s) Stage 3 of 5 (IP Configure Start) starting DHCPv6" + " as requested by IPv6 router...", + priv->iface); ret = dhcp6_start (self, connection, dhcp_opts, &reason); switch (ret) { @@ -726,7 +729,7 @@ nm_device_activate_stage1_device_prepare (gpointer user_data) priv->ip4_ready = priv->ip6_ready = FALSE; iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) started...", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) started...", iface); nm_device_state_changed (self, NM_DEVICE_STATE_PREPARE, NM_DEVICE_STATE_REASON_NONE); ret = NM_DEVICE_GET_CLASS (self)->act_stage1_prepare (self, &reason); @@ -741,7 +744,7 @@ nm_device_activate_stage1_device_prepare (gpointer user_data) nm_device_activate_schedule_stage2_device_config (self); out: - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) complete.", iface); return FALSE; } @@ -764,8 +767,8 @@ nm_device_activate_schedule_stage1_device_prepare (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage1_device_prepare, 0); - nm_info ("Activation (%s) Stage 1 of 5 (Device Prepare) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 1 of 5 (Device Prepare) scheduled...", + nm_device_get_iface (self)); } static NMActStageReturn @@ -795,7 +798,7 @@ nm_device_activate_stage2_device_config (gpointer user_data) activation_source_clear (self, FALSE, 0); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) starting...", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) starting...", iface); nm_device_state_changed (self, NM_DEVICE_STATE_CONFIG, NM_DEVICE_STATE_REASON_NONE); if (!nm_device_bring_up (self, FALSE, &no_firmware)) { @@ -816,12 +819,12 @@ nm_device_activate_stage2_device_config (gpointer user_data) } g_assert (ret == NM_ACT_STAGE_RETURN_SUCCESS); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) successful.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) successful.", iface); nm_device_activate_schedule_stage3_ip_config_start (self); out: - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) complete.", iface); return FALSE; } @@ -844,7 +847,7 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage2_device_config, 0); - nm_info ("Activation (%s) Stage 2 of 5 (Device Configure) scheduled...", + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 2 of 5 (Device Configure) scheduled...", nm_device_get_iface (self)); } @@ -873,9 +876,9 @@ aipd_cleanup (NMDevice *self) kill (priv->aipd_pid, SIGKILL); /* ensure the child is reaped */ - nm_debug ("waiting for ppp pid %d to exit", priv->aipd_pid); + nm_log_dbg (LOGD_AUTOIP4, "waiting for avahi-autoipd pid %d to exit", priv->aipd_pid); waitpid (priv->aipd_pid, NULL, 0); - nm_debug ("ppp pid %d cleaned up", priv->aipd_pid); + nm_log_dbg (LOGD_AUTOIP4, "avahi-autoip pid %d cleaned up", priv->aipd_pid); priv->aipd_pid = -1; } @@ -919,7 +922,7 @@ handle_autoip_change (NMDevice *self, NMDeviceStateReason *reason) config = aipd_get_ip4_config (self, reason); if (!config) { - nm_warning ("failed to get autoip config for rebind"); + nm_log_err (LOGD_AUTOIP4, "failed to get autoip config for rebind"); return FALSE; } @@ -931,7 +934,7 @@ handle_autoip_change (NMDevice *self, NMDeviceStateReason *reason) g_object_set_data (G_OBJECT (req), NM_ACT_REQUEST_IP4_CONFIG, config); if (!nm_device_set_ip4_config (self, config, FALSE, reason)) { - nm_warning ("(%s): failed to update IP4 config in response to autoip event.", + nm_log_err (LOGD_AUTOIP4, "(%s): failed to update IP4 config in response to autoip event.", nm_device_get_iface (self)); return FALSE; } @@ -980,14 +983,14 @@ nm_device_handle_autoip4_event (NMDevice *self, NMDeviceStateReason reason = NM_DEVICE_STATE_REASON_NONE; if (inet_pton (AF_INET, address, &ip) <= 0) { - nm_warning ("(%s): invalid address %s received from avahi-autoipd.", + nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd.", iface, address); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR); return; } if ((ip.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) { - nm_warning ("(%s): invalid address %s received from avahi-autoipd.", + nm_log_err (LOGD_AUTOIP4, "(%s): invalid address %s received from avahi-autoipd (not link-local).", iface, address); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_AUTOIP_ERROR); return; @@ -996,7 +999,7 @@ nm_device_handle_autoip4_event (NMDevice *self, switch (state) { case NM_DEVICE_STATE_IP_CONFIG: if (priv->aipd_addr) { - nm_warning ("(%s): already have autoip address!", iface); + nm_log_warn (LOGD_AUTOIP4, "(%s): already have autoip address!", iface); return; } @@ -1010,12 +1013,12 @@ nm_device_handle_autoip4_event (NMDevice *self, nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, reason); break; default: - nm_warning ("(%s): unexpected avahi-autoip event %s for %s.", + nm_log_warn (LOGD_AUTOIP4, "(%s): unexpected avahi-autoip event %s for %s.", iface, event, address); break; } } else { - nm_warning ("%s: autoip address %s no longer valid because '%s'.", + nm_log_warn (LOGD_AUTOIP4, "(%s): autoip address %s no longer valid because '%s'.", iface, address, event); /* The address is gone; terminate the connection or fail activation */ @@ -1037,14 +1040,18 @@ aipd_watch_cb (GPid pid, gint status, gpointer user_data) iface = nm_device_get_iface (self); - if (WIFEXITED (status)) - nm_warning ("%s: avahi-autoipd exited with error code %d", iface, WEXITSTATUS (status)); - else if (WIFSTOPPED (status)) - nm_warning ("%s: avahi-autoipd stopped unexpectedly with signal %d", iface, WSTOPSIG (status)); - else if (WIFSIGNALED (status)) - nm_warning ("%s: avahi-autoipd died with signal %d", iface, WTERMSIG (status)); - else - nm_warning ("%s: avahi-autoipd died from an unknown cause", iface); + if (WIFEXITED (status)) { + nm_log_dbg (LOGD_AUTOIP4, "(%s): avahi-autoipd exited with error code %d", + iface, WEXITSTATUS (status)); + } else if (WIFSTOPPED (status)) { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd stopped unexpectedly with signal %d", + iface, WSTOPSIG (status)); + } else if (WIFSIGNALED (status)) { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd died with signal %d", + iface, WTERMSIG (status)); + } else { + nm_log_warn (LOGD_AUTOIP4, "(%s): avahi-autoipd died from an unknown cause", iface); + } aipd_cleanup (self); @@ -1063,7 +1070,7 @@ aipd_timeout_cb (gpointer user_data) return FALSE; priv->aipd_timeout = 0; - nm_info ("%s: avahi-autoipd timed out.", nm_device_get_iface (self)); + nm_log_info (LOGD_AUTOIP4, "(%s): avahi-autoipd timed out.", nm_device_get_iface (self)); aipd_cleanup (self); if (nm_device_get_state (self) == NM_DEVICE_STATE_IP_CONFIG) @@ -1169,7 +1176,8 @@ handle_dhcp_lease_change (NMDevice *device, gboolean ipv6) if (ipv6) { ip6_config = nm_dhcp_client_get_ip6_config (priv->dhcp6_client, FALSE); if (!ip6_config) { - nm_warning ("failed to get DHCPv6 config for rebind"); + nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv6 config for rebind", + nm_device_get_ip_iface (device)); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); return; } @@ -1185,13 +1193,15 @@ handle_dhcp_lease_change (NMDevice *device, gboolean ipv6) dhcp6_add_option_cb, priv->dhcp6_config); } else { - nm_warning ("Failed to update IPv6 config in response to DHCP event."); + nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv6 config in response to DHCP event.", + nm_device_get_ip_iface (device)); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); } } else { ip4_config = nm_dhcp_client_get_ip4_config (priv->dhcp4_client, FALSE); if (!ip4_config) { - nm_warning ("failed to get DHCPv4 config for rebind"); + nm_log_warn (LOGD_DHCP6, "(%s): failed to get DHCPv4 config for rebind", + nm_device_get_ip_iface (device)); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED); return; } @@ -1207,7 +1217,8 @@ handle_dhcp_lease_change (NMDevice *device, gboolean ipv6) dhcp4_add_option_cb, priv->dhcp4_config); } else { - nm_warning ("Failed to update IPv4 config in response to DHCP event."); + nm_log_warn (LOGD_DHCP6, "(%s): failed to update IPv4 config in response to DHCP event.", + nm_device_get_ip_iface (device)); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, reason); } } @@ -1365,12 +1376,14 @@ real_act_stage3_ip4_config_start (NMDevice *self, NMDeviceStateReason *reason) /* Start avahi-autoipd */ if (aipd_exec (self, &error)) { - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) started" - " avahi-autoipd...", iface); + nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4, + "Activation (%s) Stage 3 of 5 (IP Configure Start) started" + " avahi-autoipd...", iface); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) failed" - " to start avahi-autoipd: %s", iface, error->message); + nm_log_info (LOGD_DEVICE | LOGD_AUTOIP4, + "Activation (%s) Stage 3 of 5 (IP Configure Start) failed" + " to start avahi-autoipd: %s", iface, error->message); g_error_free (error); aipd_cleanup (self); *reason = NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED; @@ -1495,7 +1508,7 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) activation_source_clear (self, FALSE, 0); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) started...", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) started...", iface); nm_device_state_changed (self, NM_DEVICE_STATE_IP_CONFIG, NM_DEVICE_STATE_REASON_NONE); ret = NM_DEVICE_GET_CLASS (self)->act_stage3_ip4_config_start (self, &reason); @@ -1517,7 +1530,7 @@ nm_device_activate_stage3_ip_config_start (gpointer user_data) g_assert (ret == NM_ACT_STAGE_RETURN_POSTPONE); out: - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) complete.", iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) complete.", iface); return FALSE; } @@ -1539,8 +1552,8 @@ nm_device_activate_schedule_stage3_ip_config_start (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage3_ip_config_start, 0); - nm_info ("Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 3 of 5 (IP Configure Start) scheduled.", + nm_device_get_iface (self)); } static GHashTable *shared_ips = NULL; @@ -1560,7 +1573,7 @@ reserve_shared_ip (void) while (g_hash_table_lookup (shared_ips, GUINT_TO_POINTER (start + count))) { count += ntohl (0x100); if (count > ntohl (0xFE00)) { - nm_warning ("%s: ran out of shared IP addresses!", __func__); + nm_log_err (LOGD_SHARING, "ran out of shared IP addresses!"); return 0; } } @@ -1692,7 +1705,9 @@ nm_device_activate_stage4_ip4_config_get (gpointer user_data) activation_source_clear (self, FALSE, AF_INET); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip4_config (self, &ip4_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) @@ -1710,7 +1725,9 @@ nm_device_activate_stage4_ip4_config_get (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) complete.", + iface); return FALSE; } @@ -1733,8 +1750,9 @@ nm_device_activate_schedule_stage4_ip4_config_get (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip4_config_get, AF_INET); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Get) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Get) scheduled...", + nm_device_get_iface (self)); } @@ -1774,7 +1792,9 @@ nm_device_activate_stage4_ip4_config_timeout (gpointer user_data) activation_source_clear (self, FALSE, AF_INET); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip4_config_timeout (self, &ip4_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { @@ -1792,7 +1812,9 @@ nm_device_activate_stage4_ip4_config_timeout (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) complete.", + iface); return FALSE; } @@ -1815,8 +1837,9 @@ nm_device_activate_schedule_stage4_ip4_config_timeout (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip4_config_timeout, AF_INET); - nm_info ("Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP4, + "Activation (%s) Stage 4 of 5 (IP4 Configure Timeout) scheduled...", + nm_device_get_iface (self)); } static NMActStageReturn @@ -1901,7 +1924,9 @@ nm_device_activate_stage4_ip6_config_get (gpointer user_data) activation_source_clear (self, FALSE, AF_INET6); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_get_ip6_config (self, &ip6_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) @@ -1919,7 +1944,9 @@ nm_device_activate_stage4_ip6_config_get (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) complete.", + iface); return FALSE; } @@ -1942,8 +1969,9 @@ nm_device_activate_schedule_stage4_ip6_config_get (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip6_config_get, AF_INET6); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Get) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Get) scheduled...", + nm_device_get_iface (self)); } @@ -1982,7 +2010,9 @@ nm_device_activate_stage4_ip6_config_timeout (gpointer user_data) activation_source_clear (self, FALSE, AF_INET6); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) started...", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) started...", + iface); ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip6_config_timeout (self, &ip6_config, &reason); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { @@ -2000,7 +2030,9 @@ nm_device_activate_stage4_ip6_config_timeout (gpointer user_data) nm_device_activate_schedule_stage5_ip_config_commit (self, AF_INET6); out: - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) complete.", iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) complete.", + iface); return FALSE; } @@ -2023,8 +2055,9 @@ nm_device_activate_schedule_stage4_ip6_config_timeout (NMDevice *self) activation_source_schedule (self, nm_device_activate_stage4_ip6_config_timeout, AF_INET6); - nm_info ("Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 4 of 5 (IP6 Configure Timeout) scheduled...", + nm_device_get_iface (self)); } static void @@ -2045,14 +2078,14 @@ share_init (void) char **iter; if (!nm_utils_do_sysctl ("/proc/sys/net/ipv4/ip_forward", "1\n")) { - nm_warning ("%s: Error starting IP forwarding: (%d) %s", - __func__, errno, strerror (errno)); + nm_log_err (LOGD_SHARING, "Error starting IP forwarding: (%d) %s", + errno, strerror (errno)); return FALSE; } if (!nm_utils_do_sysctl ("/proc/sys/net/ipv4/ip_dynaddr", "1\n")) { - nm_warning ("%s: Error starting IP forwarding: (%d) %s", - __func__, errno, strerror (errno)); + nm_log_err (LOGD_SHARING, "error starting IP forwarding: (%d) %s", + errno, strerror (errno)); } for (iter = modules; *iter; iter++) { @@ -2062,9 +2095,9 @@ share_init (void) if (!g_spawn_sync ("/", argv, envp, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, share_child_setup, NULL, NULL, NULL, &status, &error)) { - nm_info ("%s: Error loading NAT module %s: (%d) %s", - __func__, *iter, error ? error->code : 0, - (error && error->message) ? error->message : "unknown"); + nm_log_err (LOGD_SHARING, "error loading NAT module %s: (%d) %s", + *iter, error ? error->code : 0, + (error && error->message) ? error->message : "unknown"); if (error) g_error_free (error); } @@ -2138,7 +2171,7 @@ start_sharing (NMDevice *self) nm_act_request_set_shared (req, TRUE); if (!nm_dnsmasq_manager_start (priv->dnsmasq_manager, ip4_config, &error)) { - nm_warning ("(%s/%s): failed to start dnsmasq: %s", + nm_log_err (LOGD_SHARING, "(%s/%s): failed to start dnsmasq: %s", nm_device_get_iface (self), ip_iface, error->message); g_error_free (error); nm_act_request_set_shared (req, FALSE); @@ -2192,8 +2225,8 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) activation_source_clear (self, FALSE, 0); iface = nm_device_get_iface (self); - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) started...", - iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) started...", + iface); assumed = nm_act_request_get_assumed (priv->act_request); @@ -2203,8 +2236,9 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) } if (ip6_config && !nm_device_set_ip6_config (self, ip6_config, assumed, &reason)) { - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) IPv6 failed", - iface); + nm_log_info (LOGD_DEVICE | LOGD_IP6, + "Activation (%s) Stage 5 of 5 (IP Configure Commit) IPv6 failed", + iface); } connection = nm_act_request_get_connection (nm_device_get_act_request (self)); @@ -2216,7 +2250,7 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) if (s_ip4 && !strcmp (method, "shared")) { if (!start_sharing (self)) { - nm_warning ("Activation (%s) Stage 5 of 5 (IP Configure Commit) start sharing failed.", iface); + nm_log_warn (LOGD_SHARING, "Activation (%s) Stage 5 of 5 (IP Configure Commit) start sharing failed.", iface); nm_device_state_changed (self, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SHARED_START_FAILED); goto out; } @@ -2226,8 +2260,8 @@ nm_device_activate_stage5_ip_config_commit (gpointer user_data) nm_device_state_changed (self, NM_DEVICE_STATE_ACTIVATED, NM_DEVICE_STATE_REASON_NONE); out: - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.", - iface); + nm_log_info (LOGD_DEVICE, "Activation (%s) Stage 5 of 5 (IP Configure Commit) complete.", + iface); /* Balance IP config creation; device takes ownership in set_ip*_config() */ if (ip4_config) @@ -2269,8 +2303,9 @@ nm_device_activate_schedule_stage5_ip_config_commit (NMDevice *self, int family) activation_source_schedule (self, nm_device_activate_stage5_ip_config_commit, 0); - nm_info ("Activation (%s) Stage 5 of 5 (IP Configure Commit) scheduled...", - nm_device_get_iface (self)); + nm_log_info (LOGD_DEVICE, + "Activation (%s) Stage 5 of 5 (IP Configure Commit) scheduled...", + nm_device_get_iface (self)); } @@ -2452,9 +2487,8 @@ nm_device_deactivate (NMDeviceInterface *device, NMDeviceStateReason reason) g_return_if_fail (self != NULL); - nm_info ("(%s): deactivating device (reason: %d).", - nm_device_get_iface (self), - reason); + nm_log_info (LOGD_DEVICE, "(%s): deactivating device (reason: %d).", + nm_device_get_iface (self), reason); nm_device_deactivate_quickly (self); @@ -2750,7 +2784,7 @@ nm_device_update_ip4_address (NMDevice *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_IP4, "couldn't open control socket."); return; } @@ -2865,7 +2899,7 @@ nm_device_hw_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) if (nm_device_hw_is_up (self)) goto out; - nm_info ("(%s): bringing up device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): bringing up device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->hw_bring_up) { success = NM_DEVICE_GET_CLASS (self)->hw_bring_up (self, no_firmware); @@ -2878,7 +2912,7 @@ nm_device_hw_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) g_usleep (200); if (!nm_device_hw_is_up (self)) { - nm_warning ("(%s): device not up after timeout!", nm_device_get_iface (self)); + nm_log_warn (LOGD_HW, "(%s): device not up after timeout!", nm_device_get_iface (self)); return FALSE; } @@ -2901,7 +2935,7 @@ nm_device_hw_take_down (NMDevice *self, gboolean block) if (!nm_device_hw_is_up (self)) return; - nm_info ("(%s): taking down device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): taking down device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->hw_take_down) NM_DEVICE_GET_CLASS (self)->hw_take_down (self); @@ -2924,7 +2958,7 @@ nm_device_bring_up (NMDevice *self, gboolean block, gboolean *no_firmware) if (nm_device_is_up (self)) return TRUE; - nm_info ("(%s): preparing device.", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): preparing device.", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->bring_up) success = NM_DEVICE_GET_CLASS (self)->bring_up (self); @@ -2941,7 +2975,7 @@ nm_device_take_down (NMDevice *self, gboolean block, NMDeviceStateReason reason) nm_device_interface_deactivate (NM_DEVICE_INTERFACE (self), reason); if (nm_device_is_up (self)) { - nm_info ("(%s): cleaning up...", nm_device_get_iface (self)); + nm_log_info (LOGD_HW, "(%s): cleaning up...", nm_device_get_iface (self)); if (NM_DEVICE_GET_CLASS (self)->take_down) NM_DEVICE_GET_CLASS (self)->take_down (self); @@ -3294,8 +3328,8 @@ nm_device_state_changed (NMDevice *device, old_state = priv->state; priv->state = state; - nm_info ("(%s): device state change: %d -> %d (reason %d)", - nm_device_get_iface (device), old_state, state, reason); + nm_log_info (LOGD_DEVICE, "(%s): device state change: %d -> %d (reason %d)", + nm_device_get_iface (device), old_state, state, reason); /* Clear any delayed transitions */ delayed_transitions_clear (device); @@ -3313,8 +3347,9 @@ nm_device_state_changed (NMDevice *device, break; case NM_DEVICE_STATE_UNAVAILABLE: if (old_state == NM_DEVICE_STATE_UNMANAGED) { - if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware) - nm_warning ("%s: firmware may be missing.", nm_device_get_iface (device)); + if (!nm_device_bring_up (device, TRUE, &no_firmware) && no_firmware) { + nm_log_warn (LOGD_HW, "%s: firmware may be missing.", nm_device_get_iface (device)); + } } /* Ensure the device gets deactivated in response to stuff like * carrier changes or rfkill. But don't deactivate devices that are @@ -3350,11 +3385,12 @@ nm_device_state_changed (NMDevice *device, priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device); break; case NM_DEVICE_STATE_ACTIVATED: - nm_info ("Activation (%s) successful, device activated.", nm_device_get_iface (device)); + nm_log_info (LOGD_DEVICE, "Activation (%s) successful, device activated.", + nm_device_get_iface (device)); nm_utils_call_dispatcher ("up", nm_act_request_get_connection (req), device, NULL); break; case NM_DEVICE_STATE_FAILED: - nm_info ("Activation (%s) failed.", nm_device_get_iface (device)); + nm_log_warn (LOGD_DEVICE, "Activation (%s) failed.", nm_device_get_iface (device)); /* Schedule the transition to DISCONNECTED. The device can't transition * immediately becuase we can't change states again from the state * handler for a variety of reasons. @@ -3403,7 +3439,9 @@ nm_device_set_managed (NMDevice *device, return; priv->managed = managed; - nm_info ("(%s): now %s", nm_device_get_iface (device), managed ? "managed" : "unmanaged"); + nm_log_info (LOGD_DEVICE, "(%s): now %s", + nm_device_get_iface (device), + managed ? "managed" : "unmanaged"); g_object_notify (G_OBJECT (device), NM_DEVICE_INTERFACE_MANAGED); From 826243d5d1da693de15af6a9fd6b7c1dd99af9f6 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 12:37:48 -0700 Subject: [PATCH 049/105] wifi: update wpa utils logging --- src/wpa.c | 91 ++++++++++++++++++++++++------------------------------- 1 file changed, 39 insertions(+), 52 deletions(-) diff --git a/src/wpa.c b/src/wpa.c index 8f500476cd..5f4fd024f4 100644 --- a/src/wpa.c +++ b/src/wpa.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * WPA Supplicant - WPA state machine and EAPOL-Key processing * Copyright (c) 2003-2005, Jouni Malinen @@ -19,7 +20,7 @@ #include #include "wpa.h" -#include "nm-utils.h" +#include "nm-logging.h" typedef guint16 u16; typedef guint8 u8; @@ -207,8 +208,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, } if (wpa_ie_len < sizeof(struct wpa_ie_hdr)) { - nm_debug ("%s: ie len too short %lu", - __func__, (unsigned long) wpa_ie_len); + nm_log_dbg (LOGD_WIFI, "IE len too short %lu", + (unsigned long) wpa_ie_len); return -1; } @@ -218,8 +219,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, hdr->len != wpa_ie_len - 2 || memcmp(hdr->oui, WPA_OUI_TYPE, WPA_SELECTOR_LEN) != 0 || WPA_GET_LE16(hdr->version) != WPA_VERSION) { - nm_debug ("%s: malformed ie or unknown version", - __func__); + nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version"); return -1; } @@ -231,8 +231,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += WPA_SELECTOR_LEN; left -= WPA_SELECTOR_LEN; } else if (left > 0) { - nm_debug ("%s: ie length mismatch, %u too much", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left); return -1; } @@ -242,8 +241,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * WPA_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (pairwise), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -252,8 +251,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, left -= WPA_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for key mgmt)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)"); return -1; } @@ -263,8 +261,8 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * WPA_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (key mgmt), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -273,8 +271,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, left -= WPA_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for capabilities)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)"); return -1; } @@ -286,8 +283,7 @@ static int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, } if (left > 0) { - nm_debug ("%s: ie has %u trailing bytes", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes", left); return -1; } @@ -317,8 +313,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, } if (rsn_ie_len < sizeof(struct rsn_ie_hdr)) { - nm_debug ("%s: ie len too short %lu", - __func__, (unsigned long) rsn_ie_len); + nm_log_dbg (LOGD_WIFI, "IE len too short %lu", + (unsigned long) rsn_ie_len); return -1; } @@ -327,8 +323,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, if (hdr->elem_id != WPA_RSN_INFO_ELEM || hdr->len != rsn_ie_len - 2 || WPA_GET_LE16(hdr->version) != RSN_VERSION) { - nm_debug ("%s: malformed ie or unknown version", - __func__); + nm_log_dbg (LOGD_WIFI, "malformed IE or unknown version"); return -1; } @@ -340,8 +335,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += RSN_SELECTOR_LEN; left -= RSN_SELECTOR_LEN; } else if (left > 0) { - nm_debug ("%s: ie length mismatch, %u too much", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE length mismatch, %u too much", left); return -1; } @@ -351,8 +345,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * RSN_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (pairwise), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (pairwise), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -361,8 +355,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, left -= RSN_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for key mgmt)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for key mgmt)"); return -1; } @@ -372,8 +365,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (count == 0 || left < count * RSN_SELECTOR_LEN) { - nm_debug ("%s: ie count botch (key mgmt), " - "count %u left %u", __func__, count, left); + nm_log_dbg (LOGD_WIFI, "IE count botch (key mgmt), " + "count %u left %u", count, left); return -1; } for (i = 0; i < count; i++) { @@ -382,8 +375,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, left -= RSN_SELECTOR_LEN; } } else if (left == 1) { - nm_debug ("%s: ie too short (for capabilities)", - __func__); + nm_log_dbg (LOGD_WIFI, "IE too short (for capabilities)"); return -1; } @@ -399,9 +391,9 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, pos += 2; left -= 2; if (left < data->num_pmkid * PMKID_LEN) { - nm_debug ("%s: PMKID underflow " - "(num_pmkid=%d left=%d)", - __func__, data->num_pmkid, left); + nm_log_dbg (LOGD_WIFI, "PMKID underflow " + "(num_pmkid=%d left=%d)", + data->num_pmkid, left); data->num_pmkid = 0; } else { data->pmkid = pos; @@ -411,8 +403,7 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, } if (left > 0) { - nm_debug ("%s: ie has %u trailing bytes - ignored", - __func__, left); + nm_log_dbg (LOGD_WIFI, "IE has %u trailing bytes - ignored", left); } return 0; @@ -430,8 +421,8 @@ static int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, */ wpa_ie_data * wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len) { - wpa_ie_data * data = NULL; - int err = -1; + wpa_ie_data *data = NULL; + int err = -1; if (!wpa_ie || wpa_ie_len <= 0) return NULL; @@ -443,25 +434,21 @@ wpa_ie_data * wpa_parse_wpa_ie(const u8 *wpa_ie, size_t wpa_ie_len) else err = wpa_parse_wpa_ie_wpa(wpa_ie, wpa_ie_len, data); - if (err != 0) - { + if (err != 0) { g_slice_free (wpa_ie_data, data); data = NULL; } -#if 0 - if (data) - { - nm_debug ("WPA IE: -------------------"); - nm_debug (" proto 0x%X", data->proto); - nm_debug (" pw cipher 0x%X", data->pairwise_cipher); - nm_debug (" gr cipher 0x%X", data->group_cipher); - nm_debug (" key mgmt 0x%X", data->key_mgmt); - nm_debug (" capabilities 0x%X", data->capabilities); - nm_debug (" # pmkid 0x%X", data->num_pmkid); - nm_debug (""); + if (data) { + nm_log_dbg (LOGD_WIFI, "WPA IE: -------------------"); + nm_log_dbg (LOGD_WIFI, " proto 0x%X", data->proto); + nm_log_dbg (LOGD_WIFI, " pw cipher 0x%X", data->pairwise_cipher); + nm_log_dbg (LOGD_WIFI, " gr cipher 0x%X", data->group_cipher); + nm_log_dbg (LOGD_WIFI, " key mgmt 0x%X", data->key_mgmt); + nm_log_dbg (LOGD_WIFI, " capabilities 0x%X", data->capabilities); + nm_log_dbg (LOGD_WIFI, " # pmkid 0x%X", data->num_pmkid); + nm_log_dbg (LOGD_WIFI, ""); } -#endif return data; } From 9186db769ac65c78100d0d4e4401181310c45dc3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:02:32 -0700 Subject: [PATCH 050/105] wifi: update logging --- src/nm-device-wifi.c | 302 ++++++++++++++++++++++--------------------- 1 file changed, 156 insertions(+), 146 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 6f473e1b1c..68f59b6f96 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2005 - 2009 Red Hat, Inc. + * Copyright (C) 2005 - 2010 Red Hat, Inc. * Copyright (C) 2006 - 2008 Novell, Inc. */ @@ -37,6 +37,7 @@ #include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-marshal.h" #include "NetworkManagerUtils.h" #include "nm-activation-request.h" @@ -376,7 +377,7 @@ wireless_get_range (NMDeviceWifi *self, fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("(%s): couldn't open control socket.", iface); + nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface); return FALSE; } @@ -396,15 +397,19 @@ wireless_get_range (NMDeviceWifi *self, success = TRUE; break; } else if (errno != EAGAIN) { - nm_warning ("(%s): couldn't get driver range information (%d).", iface, errno); + nm_log_err (LOGD_HW, "(%s): couldn't get driver range information (%d).", + iface, errno); break; } g_usleep (G_USEC_PER_SEC / 4); } - if (i <= 0) - nm_warning ("(%s): driver took too long to respond to IWRANGE query.", iface); + if (i <= 0) { + nm_log_warn (LOGD_HW, + "(%s): driver took too long to respond to IWRANGE query.", + iface); + } close (fd); return success; @@ -427,14 +432,14 @@ real_get_generic_capabilities (NMDevice *dev) /* Check for Wireless Extensions support >= 16 for wireless devices */ if ((response_len < 300) || (range.we_version_compiled < 16)) { - nm_warning ("(%s): driver's Wireless Extensions version (%d) is too old.", + nm_log_err (LOGD_HW, "(%s): driver's Wireless Extensions version (%d) is too old.", iface, range.we_version_compiled); return NM_DEVICE_CAP_NONE; } fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("(%s): couldn't open control socket.", iface); + nm_log_err (LOGD_HW, "(%s): couldn't open control socket.", iface); goto out; } @@ -492,16 +497,16 @@ get_wireless_capabilities (NMDeviceWifi *self, /* Check for cipher support but not WPA support */ if ( (caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP)) && !(caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN))) { - nm_warning ("%s: device supports WPA ciphers but not WPA protocol; " - "WPA unavailable.", iface); + nm_log_warn (LOGD_WIFI, "%s: device supports WPA ciphers but not WPA protocol; " + "WPA unavailable.", iface); caps &= ~WPA_CAPS; } /* Check for WPA support but not cipher support */ if ( (caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)) && !(caps & (NM_WIFI_DEVICE_CAP_CIPHER_TKIP | NM_WIFI_DEVICE_CAP_CIPHER_CCMP))) { - nm_warning ("%s: device supports WPA protocol but not WPA ciphers; " - "WPA unavailable.", iface); + nm_log_warn (LOGD_WIFI, "%s: device supports WPA protocol but not WPA ciphers; " + "WPA unavailable.", iface); caps &= ~WPA_CAPS; } } @@ -592,13 +597,13 @@ constructor (GType type, scan_capa_range = (struct iw_range_with_scan_capa *) ⦥ if (scan_capa_range->scan_capa & NM_IW_SCAN_CAPA_ESSID) { priv->has_scan_capa_ssid = TRUE; - nm_info ("(%s): driver supports SSID scans (scan_capa 0x%02X).", - nm_device_get_iface (NM_DEVICE (self)), - scan_capa_range->scan_capa); + nm_log_info (LOGD_HW, "(%s): driver supports SSID scans (scan_capa 0x%02X).", + nm_device_get_iface (NM_DEVICE (self)), + scan_capa_range->scan_capa); } else { - nm_info ("(%s): driver does not support SSID scans (scan_capa 0x%02X).", - nm_device_get_iface (NM_DEVICE (self)), - scan_capa_range->scan_capa); + nm_log_info (LOGD_HW, "(%s): driver does not support SSID scans (scan_capa 0x%02X).", + nm_device_get_iface (NM_DEVICE (self)), + scan_capa_range->scan_capa); } /* 802.11 wireless-specific capabilities */ @@ -652,7 +657,7 @@ supplicant_interface_acquire (NMDeviceWifi *self) nm_device_get_iface (NM_DEVICE (self)), TRUE); if (priv->supplicant.iface == NULL) { - nm_warning ("Couldn't initialize supplicant interface for %s.", + nm_log_err (LOGD_WIFI, "Couldn't initialize supplicant interface for %s.", nm_device_get_iface (NM_DEVICE (self))); return FALSE; } @@ -809,35 +814,30 @@ get_active_ap (NMDeviceWifi *self, const GByteArray *ssid; GSList *iter; int i = 0; - gboolean ap_debug = getenv ("NM_ACTIVE_AP_DEBUG") ? TRUE : FALSE; nm_device_wifi_get_bssid (self, &bssid); - if (G_UNLIKELY (ap_debug)) { - nm_debug ("(%s) BSSID: %02x:%02x:%02x:%02x:%02x:%02x", - iface, - bssid.ether_addr_octet[0], bssid.ether_addr_octet[1], - bssid.ether_addr_octet[2], bssid.ether_addr_octet[3], - bssid.ether_addr_octet[4], bssid.ether_addr_octet[5]); - } + nm_log_dbg (LOGD_WIFI, "(%s): active BSSID: %02x:%02x:%02x:%02x:%02x:%02x", + iface, + bssid.ether_addr_octet[0], bssid.ether_addr_octet[1], + bssid.ether_addr_octet[2], bssid.ether_addr_octet[3], + bssid.ether_addr_octet[4], bssid.ether_addr_octet[5]); + if (!nm_ethernet_address_is_valid (&bssid)) return NULL; ssid = nm_device_wifi_get_ssid (self); - if G_UNLIKELY (ap_debug) { - nm_debug ("(%s) SSID: %s%s%s", - iface, - ssid ? "'" : "", - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", - ssid ? "'" : ""); - } + nm_log_dbg (LOGD_WIFI, "(%s): active SSID: %s%s%s", + iface, + ssid ? "'" : "", + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", + ssid ? "'" : ""); /* When matching hidden APs, do a second pass that ignores the SSID check, * because NM might not yet know the SSID of the hidden AP in the scan list * and therefore it won't get matched the first time around. */ while (i++ < (match_hidden ? 2 : 1)) { - if G_UNLIKELY (ap_debug) - nm_debug (" Pass #%d %s", i, i > 1 ? "(ignoring SSID)" : ""); + nm_log_dbg (LOGD_WIFI, " Pass #%d %s", i, i > 1 ? "(ignoring SSID)" : ""); /* Find this SSID + BSSID in the device's AP list */ for (iter = priv->ap_list; iter; iter = g_slist_next (iter)) { @@ -847,63 +847,52 @@ get_active_ap (NMDeviceWifi *self, NM80211Mode devmode, apmode; guint32 devfreq, apfreq; - if G_UNLIKELY (ap_debug) { - nm_debug (" AP: %s%s%s %02x:%02x:%02x:%02x:%02x:%02x", - ap_ssid ? "'" : "", - ap_ssid ? nm_utils_escape_ssid (ap_ssid->data, ap_ssid->len) : "(none)", - ap_ssid ? "'" : "", - ap_bssid->ether_addr_octet[0], ap_bssid->ether_addr_octet[1], - ap_bssid->ether_addr_octet[2], ap_bssid->ether_addr_octet[3], - ap_bssid->ether_addr_octet[4], ap_bssid->ether_addr_octet[5]); - } + nm_log_dbg (LOGD_WIFI, " AP: %s%s%s %02x:%02x:%02x:%02x:%02x:%02x", + ap_ssid ? "'" : "", + ap_ssid ? nm_utils_escape_ssid (ap_ssid->data, ap_ssid->len) : "(none)", + ap_ssid ? "'" : "", + ap_bssid->ether_addr_octet[0], ap_bssid->ether_addr_octet[1], + ap_bssid->ether_addr_octet[2], ap_bssid->ether_addr_octet[3], + ap_bssid->ether_addr_octet[4], ap_bssid->ether_addr_octet[5]); if (ignore_ap && (ap == ignore_ap)) { - if G_UNLIKELY (ap_debug) - nm_debug (" ignored"); + nm_log_dbg (LOGD_WIFI, " ignored"); continue; } if (memcmp (bssid.ether_addr_octet, ap_bssid->ether_addr_octet, ETH_ALEN)) { - if G_UNLIKELY (ap_debug) - nm_debug (" BSSID mismatch"); + nm_log_dbg (LOGD_WIFI, " BSSID mismatch"); continue; } if ((i == 0) && !nm_utils_same_ssid (ssid, ap_ssid, TRUE)) { - if G_UNLIKELY (ap_debug) - nm_debug (" SSID mismatch"); + nm_log_dbg (LOGD_WIFI, " SSID mismatch"); continue; } devmode = nm_device_wifi_get_mode (self); apmode = nm_ap_get_mode (ap); if (devmode != apmode) { - if G_UNLIKELY (ap_debug) { - nm_debug (" mode mismatch (device %d, ap %d)", - devmode, apmode); - } + nm_log_dbg (LOGD_WIFI, " mode mismatch (device %d, ap %d)", + devmode, apmode); continue; } devfreq = nm_device_wifi_get_frequency (self); apfreq = nm_ap_get_freq (ap); if (devfreq != apfreq) { - if G_UNLIKELY (ap_debug) { - nm_debug (" frequency mismatch (device %u, ap %u)", - devfreq, apfreq); - } + nm_log_dbg (LOGD_WIFI, " frequency mismatch (device %u, ap %u)", + devfreq, apfreq); continue; } // FIXME: handle security settings here too - if G_UNLIKELY (ap_debug) - nm_debug (" matched"); + nm_log_dbg (LOGD_WIFI, " matched"); return ap; } } - if G_UNLIKELY (ap_debug) - nm_debug (" No matching AP found."); + nm_log_dbg (LOGD_WIFI, " No matching AP found."); return NULL; } @@ -996,11 +985,12 @@ periodic_update (NMDeviceWifi *self) old_ssid = nm_ap_get_ssid (priv->current_ap); } - nm_debug ("Roamed from BSSID %s (%s) to %s (%s)", - old_addr ? old_addr : "(none)", - old_ssid ? nm_utils_escape_ssid (old_ssid->data, old_ssid->len) : "(none)", - new_addr ? new_addr : "(none)", - new_ssid ? nm_utils_escape_ssid (new_ssid->data, new_ssid->len) : "(none)"); + nm_log_info (LOGD_WIFI, "(%s): roamed from BSSID %s (%s) to %s (%s)", + nm_device_get_iface (NM_DEVICE (self)), + old_addr ? old_addr : "(none)", + old_ssid ? nm_utils_escape_ssid (old_ssid->data, old_ssid->len) : "(none)", + new_addr ? new_addr : "(none)", + new_ssid ? nm_utils_escape_ssid (new_ssid->data, new_ssid->len) : "(none)"); g_free (old_addr); g_free (new_addr); @@ -1297,7 +1287,6 @@ nm_device_wifi_get_address (NMDeviceWifi *self, memcpy (addr, &(priv->hw_addr), sizeof (struct ether_addr)); } -#if DEBUG static void nm_device_wifi_ap_list_print (NMDeviceWifi *self) { @@ -1307,14 +1296,13 @@ nm_device_wifi_ap_list_print (NMDeviceWifi *self) g_return_if_fail (NM_IS_DEVICE_WIFI (self)); - nm_info ("AP_LIST_PRINT:"); + nm_log_dbg (LOGD_WIFI_SCAN, "AP_LIST_PRINT:"); for (elt = priv->ap_list; elt; elt = g_slist_next (elt), i++) { NMAccessPoint * ap = NM_AP (elt->data); nm_ap_print_self (ap, "::\t"); } - nm_info ("AP_LIST_PRINT: done"); + nm_log_dbg (LOGD_WIFI_SCAN, "AP_LIST_PRINT: done"); } -#endif static gboolean impl_device_get_access_points (NMDeviceWifi *self, @@ -1371,8 +1359,10 @@ nm_device_wifi_get_mode (NMDeviceWifi *self) break; } } else { - if (errno != ENODEV) - nm_warning ("error getting card mode on %s: %s", iface, strerror (errno)); + if (errno != ENODEV) { + nm_log_warn (LOGD_HW, "(%s): error %d getting card mode", + iface, strerror (errno)); + } } close (fd); @@ -1422,7 +1412,7 @@ nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode) if (ioctl (fd, SIOCSIWMODE, &wrq) < 0) { if (errno != ENODEV) { - nm_warning ("error setting card %s to mode %d: %s", + nm_log_err (LOGD_HW, "(%s): error setting mode %d", iface, mode, strerror (errno)); } } else @@ -1458,9 +1448,10 @@ nm_device_wifi_get_frequency (NMDeviceWifi *self) iface = nm_device_get_iface (NM_DEVICE (self)); strncpy (wrq.ifr_name, iface, IFNAMSIZ); - if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) - nm_warning ("(%s): error getting frequency: %s", iface, strerror (errno)); - else + if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) { + nm_log_warn (LOGD_HW, "(%s): error getting frequency: %s", + iface, strerror (errno)); + } else freq = iw_freq_to_uint32 (&wrq.u.freq); close (fd); @@ -1597,7 +1588,7 @@ nm_device_wifi_get_ssid (NMDeviceWifi *self) sk = socket (AF_INET, SOCK_DGRAM, 0); if (!sk) { - nm_error ("Couldn't create socket: %d.", errno); + nm_log_err (LOGD_HW, "couldn't create socket: %d.", errno); return NULL; } @@ -1608,7 +1599,8 @@ nm_device_wifi_get_ssid (NMDeviceWifi *self) strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ); if (ioctl (sk, SIOCGIWESSID, &wrq) < 0) { - nm_warning ("Couldn't get SSID: %d", errno); + nm_log_err (LOGD_HW, "(%s): couldn't get SSID: %d", + nm_device_get_iface (NM_DEVICE (self)), errno); goto out; } @@ -1683,7 +1675,7 @@ nm_device_wifi_get_bssid (NMDeviceWifi *self, fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("failed to open control socket."); + nm_log_err (LOGD_WIFI, "failed to open control socket."); return; } @@ -2146,6 +2138,8 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface *iface, /* Remove outdated access points */ cull_scan_list (self); + nm_device_wifi_ap_list_print (self); + g_object_unref (ap); } @@ -2203,7 +2197,7 @@ link_timeout_cb (gpointer user_data) ap = nm_device_wifi_get_activation_ap (self); if (req == NULL || ap == NULL) { /* shouldn't ever happen */ - nm_warning ("couldn't get activation request or activation AP."); + nm_log_err (LOGD_WIFI, "couldn't get activation request or activation AP."); if (nm_device_is_activating (dev)) { cleanup_association_attempt (self, TRUE); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NONE); @@ -2250,8 +2244,9 @@ link_timeout_cb (gpointer user_data) * bad encryption key and the authenticating entity (AP, RADIUS server, etc) * denied the association due to bad credentials. */ - nm_info ("Activation (%s/wireless): disconnected during association," - " asking for new key.", nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): disconnected during association," + " asking for new key.", nm_device_get_iface (dev)); cleanup_association_attempt (self, TRUE); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); nm_act_request_get_secrets (req, @@ -2265,7 +2260,7 @@ link_timeout_cb (gpointer user_data) } time_out: - nm_info ("%s: link timed out.", nm_device_get_iface (dev)); + nm_log_warn (LOGD_WIFI, "(%s): link timed out.", nm_device_get_iface (dev)); return FALSE; } @@ -2289,7 +2284,7 @@ schedule_state_handler (NMDeviceWifi *self, task = g_slice_new0 (SupplicantStateTask); if (!task) { - nm_warning ("Not enough memory to process supplicant manager state change."); + nm_log_err (LOGD_WIFI, "Not enough memory to process supplicant manager state change."); return FALSE; } @@ -2319,10 +2314,10 @@ supplicant_iface_state_cb_handler (gpointer user_data) self = task->self; priv = NM_DEVICE_WIFI_GET_PRIVATE (self); - nm_info ("(%s): supplicant interface state: %s -> %s", - nm_device_get_iface (NM_DEVICE (self)), - nm_supplicant_interface_state_to_string (task->old_state), - nm_supplicant_interface_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant interface state: %s -> %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_supplicant_interface_state_to_string (task->old_state), + nm_supplicant_interface_state_to_string (task->new_state)); if (task->new_state == NM_SUPPLICANT_INTERFACE_STATE_READY) { priv->scan_interval = SCAN_INTERVAL_MIN; @@ -2381,10 +2376,10 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) goto out; } - nm_info ("(%s): supplicant connection state: %s -> %s", - nm_device_get_iface (dev), - nm_supplicant_interface_connection_state_to_string (task->old_state), - nm_supplicant_interface_connection_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant connection state: %s -> %s", + nm_device_get_iface (dev), + nm_supplicant_interface_connection_state_to_string (task->old_state), + nm_supplicant_interface_connection_state_to_string (task->new_state)); scanning = nm_supplicant_interface_get_scanning (priv->supplicant.iface); @@ -2399,10 +2394,11 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) NMAccessPoint *ap = nm_device_wifi_get_activation_ap (self); const GByteArray * ssid = nm_ap_get_ssid (ap); - nm_info ("Activation (%s/wireless) Stage 2 of 5 (Device Configure) " - "successful. Connected to wireless network '%s'.", - nm_device_get_iface (dev), - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless) Stage 2 of 5 (Device Configure) " + "successful. Connected to wireless network '%s'.", + nm_device_get_iface (dev), + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); nm_device_activate_schedule_stage3_ip_config_start (dev); } } else if (task->new_state == NM_SUPPLICANT_INTERFACE_CON_STATE_DISCONNECTED) { @@ -2455,10 +2451,10 @@ supplicant_mgr_state_cb_handler (gpointer user_data) priv = NM_DEVICE_WIFI_GET_PRIVATE (self); dev = NM_DEVICE (self); - nm_info ("(%s): supplicant manager state: %s -> %s", - nm_device_get_iface (NM_DEVICE (self)), - nm_supplicant_manager_state_to_string (task->old_state), - nm_supplicant_manager_state_to_string (task->new_state)); + nm_log_info (LOGD_WIFI, "(%s): supplicant manager state: %s -> %s", + nm_device_get_iface (NM_DEVICE (self)), + nm_supplicant_manager_state_to_string (task->old_state), + nm_supplicant_manager_state_to_string (task->new_state)); /* If the supplicant went away, release the supplicant interface */ if (task->new_state == NM_SUPPLICANT_MANAGER_STATE_DOWN) { @@ -2529,11 +2525,12 @@ supplicant_iface_connection_error_cb_handler (gpointer user_data) if (!nm_device_is_activating (NM_DEVICE (self))) goto out; - nm_info ("Activation (%s/wireless): association request to the supplicant " - "failed: %s - %s", - nm_device_get_iface (NM_DEVICE (self)), - cb_data->name, - cb_data->message); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association request to the supplicant " + "failed: %s - %s", + nm_device_get_iface (NM_DEVICE (self)), + cb_data->name, + cb_data->message); cleanup_association_attempt (self, TRUE); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); @@ -2562,7 +2559,7 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface * iface, cb_data = g_slice_new0 (struct iface_con_error_cb_data); if (cb_data == NULL) { - nm_warning ("Not enough memory to process supplicant connection error."); + nm_log_err (LOGD_WIFI, "Not enough memory to process supplicant connection error."); return; } @@ -2643,7 +2640,7 @@ handle_auth_or_fail (NMDeviceWifi *self, g_object_set_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES, GUINT_TO_POINTER (++tries)); } else { - nm_warning ("Cleared secrets, but setting didn't need any secrets."); + nm_log_warn (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); } return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -2686,19 +2683,22 @@ supplicant_connection_timeout_cb (gpointer user_data) auth_enforced = ap_auth_enforced (connection, ap, &encrypted); if (!encrypted) { - nm_info ("Activation (%s/wireless): association took too long, " - "failing activation.", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association took too long, " + "failing activation.", + nm_device_get_iface (dev)); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT); } else { /* Authentication failed, encryption key is probably bad */ - nm_info ("Activation (%s/wireless): association took too long.", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): association took too long.", + nm_device_get_iface (dev)); if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) { - nm_info ("Activation (%s/wireless): asking for new secrets", - nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): asking for new secrets", + nm_device_get_iface (dev)); } else { nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); @@ -2721,8 +2721,9 @@ start_supplicant_connection_timeout (NMDeviceWifi *self) /* Set up a timeout on the connection attempt to fail it after 25 seconds */ id = g_timeout_add_seconds (25, supplicant_connection_timeout_cb, self); - if (id <= 0) { - nm_warning ("Activation (%s/wireless): couldn't start supplicant " + if (id == 0) { + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't start supplicant " "timeout timer.", nm_device_get_iface (NM_DEVICE (self))); return FALSE; @@ -2808,7 +2809,7 @@ build_supplicant_config (NMDeviceWifi *self, nm_ap_get_broadcast (ap), adhoc_freq, priv->has_scan_capa_ssid)) { - nm_warning ("Couldn't add 802-11-wireless setting to supplicant config."); + nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless setting to supplicant config."); goto error; } @@ -2823,13 +2824,13 @@ build_supplicant_config (NMDeviceWifi *self, s_wireless_sec, s_8021x, con_path)) { - nm_warning ("Couldn't add 802-11-wireless-security setting to " + nm_log_err (LOGD_WIFI, "Couldn't add 802-11-wireless-security setting to " "supplicant config."); goto error; } } else { if (!nm_supplicant_config_add_no_security (config)) { - nm_warning ("Couldn't add unsecured option to supplicant config."); + nm_log_err (LOGD_WIFI, "Couldn't add unsecured option to supplicant config."); goto error; } } @@ -2853,15 +2854,15 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - g_warning ("could not open control socket."); + nm_log_err (LOGD_HW, "could not open control socket."); return; } memset (&req, 0, sizeof (struct ifreq)); strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_err (LOGD_HW, "(%s) error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -2962,7 +2963,8 @@ real_connection_secrets_updated (NMDevice *dev, || !strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME)) { valid = TRUE; } else { - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); + nm_log_warn (LOGD_DEVICE, "Ignoring updated secrets for setting '%s'.", + setting_name); } } @@ -3012,9 +3014,10 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) /* If we need secrets, get them */ setting_name = nm_connection_need_secrets (connection, NULL); if (setting_name) { - nm_info ("Activation (%s/wireless): access point '%s' has security," - " but secrets are required.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): access point '%s' has security," + " but secrets are required.", + iface, nm_setting_connection_get_id (s_connection)); ret = handle_auth_or_fail (self, req, FALSE); if (ret == NM_ACT_STAGE_RETURN_FAILURE) @@ -3024,19 +3027,22 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) /* have secrets, or no secrets required */ if (nm_setting_wireless_get_security (s_wireless)) { - nm_info ("Activation (%s/wireless): connection '%s' has security" - ", and secrets exist. No new secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): connection '%s' has security" + ", and secrets exist. No new secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); } else { - nm_info ("Activation (%s/wireless): connection '%s' requires no " - "security. No secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): connection '%s' requires no " + "security. No secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); } config = build_supplicant_config (self, connection, ap); if (config == NULL) { - nm_warning ("Activation (%s/wireless): couldn't build wireless " - "configuration.", iface); + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't build wireless configuration.", + iface); *reason = NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED; goto out; } @@ -3049,8 +3055,9 @@ real_act_stage2_config (NMDevice *dev, NMDeviceStateReason *reason) priv->supplicant.iface_error_id = id; if (!nm_supplicant_interface_set_config (priv->supplicant.iface, config)) { - nm_warning ("Activation (%s/wireless): couldn't send wireless " - "configuration to the supplicant.", iface); + nm_log_err (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): couldn't send wireless " + "configuration to the supplicant.", iface); *reason = NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED; goto out; } @@ -3142,14 +3149,16 @@ real_act_stage4_ip4_config_timeout (NMDevice *dev, s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); /* Activation failed, we must have bad encryption key */ - nm_info ("Activation (%s/wireless): could not get IP configuration for " - "connection '%s'.", - nm_device_get_iface (dev), nm_setting_connection_get_id (s_con)); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): could not get IP configuration for " + "connection '%s'.", + nm_device_get_iface (dev), nm_setting_connection_get_id (s_con)); ret = handle_auth_or_fail (self, req, TRUE); if (ret == NM_ACT_STAGE_RETURN_POSTPONE) { - nm_info ("Activation (%s/wireless): asking for new secrets", - nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s/wireless): asking for new secrets", + nm_device_get_iface (dev)); } else { *reason = NM_DEVICE_STATE_REASON_NO_SECRETS; } @@ -3276,9 +3285,10 @@ activation_failure_handler (NMDevice *dev) } ssid = nm_ap_get_ssid (ap); - nm_info ("Activation (%s) failed for access point (%s)", - nm_device_get_iface (dev), - ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); + nm_log_warn (LOGD_DEVICE | LOGD_WIFI, + "Activation (%s) failed for access point (%s)", + nm_device_get_iface (dev), + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)"); } static gboolean @@ -3441,7 +3451,7 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) struct iw_range range; if (state != NM_DEVICE_STATE_UNAVAILABLE) - nm_warning ("not in expected unavailable state!"); + nm_log_warn (LOGD_CORE, "not in expected unavailable state!"); if (!nm_device_hw_bring_up (NM_DEVICE (self), TRUE, &no_firmware)) { /* The device sucks, or HAL was lying to us about the killswitch state */ From 4e828c1bceb4c160665d69d75c1494acd4b82c64 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:10:33 -0700 Subject: [PATCH 051/105] system: update logging --- src/nm-system.c | 63 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/src/nm-system.c b/src/nm-system.c index 78a3381eb0..bd5f57f51d 100644 --- a/src/nm-system.c +++ b/src/nm-system.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2004 - 2008 Red Hat, Inc. + * Copyright (C) 2004 - 2010 Red Hat, Inc. * Copyright (C) 2005 - 2008 Novell, Inc. * Copyright (C) 1996 - 1997 Yoichi Hariguchi * Copyright (C) January, 1998 Sergei Viznyuk @@ -47,6 +47,7 @@ #include "nm-named-manager.h" #include "NetworkManagerUtils.h" #include "nm-utils.h" +#include "nm-logging.h" #include "nm-netlink.h" /* Because of a bug in libnl, rtnl.h should be included before route.h */ @@ -95,10 +96,11 @@ create_route (int iface_idx, int mss) if (route) { rtnl_route_set_oif (route, iface_idx); - if (mss && rtnl_route_set_metric (route, RTAX_ADVMSS, mss) < 0) - nm_warning ("Could not set mss"); + if (mss && rtnl_route_set_metric (route, RTAX_ADVMSS, mss) < 0) { + nm_log_warn (LOGD_DEVICE, "could not set mss"); + } } else - nm_warning ("Could not allocate route"); + nm_log_err (LOGD_DEVICE, "could not allocate route"); return route; } @@ -141,7 +143,7 @@ nm_system_device_set_ip4_route (const char *iface, rtnl_route_set_gateway (route, gw_addr); rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE); } else { - nm_warning ("Invalid gateway"); + nm_log_err (LOGD_DEVICE | LOGD_IP4, "Invalid gateway 0x%X", ip4_gateway); rtnl_route_put (route); return NULL; } @@ -176,7 +178,9 @@ nm_system_device_set_ip4_route (const char *iface, nl_addr_put (gw_addr); if (err) { - nm_warning ("Failed to set IPv4 route on '%s': %s", iface, nl_geterror ()); + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 route: %s", + iface, nl_geterror ()); rtnl_route_put (route); route = NULL; } @@ -193,6 +197,9 @@ sync_addresses (const char *iface, int ifindex, int family, struct rtnl_addr *filter_addr, *match_addr; struct nl_object *match; int i, err; + guint32 log_domain = (family == AF_INET) ? LOGD_IP4 : LOGD_IP6; + + log_domain |= LOGD_DEVICE; nlh = nm_netlink_get_default_handle (); if (!nlh) @@ -247,7 +254,7 @@ sync_addresses (const char *iface, int ifindex, int family, /* Otherwise, match_addr should be removed from the interface. */ err = rtnl_addr_delete (nlh, match_addr, 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_addr_delete(): %s", + nm_log_err (log_domain, "(%s): error %d returned from rtnl_addr_delete(): %s", iface, err, nl_geterror ()); } } @@ -262,7 +269,8 @@ sync_addresses (const char *iface, int ifindex, int family, err = rtnl_addr_add (nlh, addrs[i], 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_addr_add():\n%s", + nm_log_err (log_domain, + "(%s): error %d returned from rtnl_addr_add():\n%s", iface, err, nl_geterror ()); } @@ -301,7 +309,9 @@ add_ip4_addresses (NMIP4Config *config, const char *iface) addrs[i] = nm_ip4_config_to_rtnl_addr (config, i, flags); if (!addrs[i]) { - nm_warning ("couldn't create rtnl address!\n"); + nm_log_warn (LOGD_DEVICE | LOGD_IP4, + "(%s): couldn't create rtnl address!", + iface); continue; } rtnl_addr_set_ifindex (addrs[i], iface_idx); @@ -464,7 +474,7 @@ nm_system_device_set_ip6_route (const char *iface, rtnl_route_set_gateway (route, gw_addr); rtnl_route_set_scope (route, RT_SCOPE_UNIVERSE); } else { - nm_warning ("Invalid gateway"); + nm_log_warn (LOGD_DEVICE | LOGD_IP6, "Invalid gateway"); rtnl_route_put (route); return NULL; } @@ -499,7 +509,9 @@ nm_system_device_set_ip6_route (const char *iface, nl_addr_put (gw_addr); if (err) { - nm_warning ("Failed to set IPv6 route on '%s': %s", iface, nl_geterror ()); + nm_log_err (LOGD_DEVICE | LOGD_IP6, + "(%s): failed to set IPv6 route: %s", + iface, nl_geterror ()); rtnl_route_put (route); route = NULL; } @@ -526,7 +538,9 @@ add_ip6_addresses (NMIP6Config *config, const char *iface) addrs[i] = nm_ip6_config_to_rtnl_addr (config, i, NM_RTNL_ADDR_DEFAULT); if (!addrs[i]) { - nm_warning ("couldn't create rtnl address!\n"); + nm_log_warn (LOGD_DEVICE | LOGD_IP6, + "(%s): couldn't create rtnl address!", + iface); continue; } rtnl_addr_set_ifindex (addrs[i], iface_idx); @@ -661,7 +675,7 @@ nm_system_device_is_up_with_iface (const char *iface) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return FALSE; } @@ -670,8 +684,8 @@ nm_system_device_is_up_with_iface (const char *iface) strncpy (ifr.ifr_name, iface, IFNAMSIZ); if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0) { if (errno != ENODEV) { - nm_warning ("%s: could not get flags for device %s. errno = %d", - __func__, iface, errno); + nm_log_err (LOGD_HW, "(%s): could not get flags: errno %d", + iface, errno); } } else { up = !!(ifr.ifr_flags & IFF_UP); @@ -753,7 +767,9 @@ add_ip4_route_to_gateway (const char *iface, guint32 gw, guint32 mss) /* Add direct route to the gateway */ err = rtnl_route_add (nlh, route, 0); if (err) { - nm_warning ("(%s): failed to add IPv4 route to gateway (%d)", iface, err); + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to add IPv4 route to gateway (%d)", + iface, err); goto error; } @@ -853,7 +869,8 @@ nm_system_replace_default_ip4_route_vpn (const char *iface, if (err == 0) { return TRUE; } else if (err != -ESRCH) { - nm_warning ("(%s): failed to set IPv4 default route: %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route: %d", iface, err); return FALSE; } @@ -867,7 +884,8 @@ nm_system_replace_default_ip4_route_vpn (const char *iface, err = replace_default_ip4_route (iface, int_gw, mss); if (err != 0) { rtnl_route_del (nlh, gw_route, 0); - nm_warning ("(%s): failed to set IPv4 default route (pass #2): %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route (pass #2): %d", iface, err); } else success = TRUE; @@ -897,7 +915,8 @@ nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss) if (err == 0) { return TRUE; } else if (err != -ESRCH) { - nm_warning ("(%s): failed to set IPv4 default route: %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route: %d", iface, err); return FALSE; } @@ -911,7 +930,8 @@ nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss) err = replace_default_ip4_route (iface, gw, mss); if (err != 0) { rtnl_route_del (nlh, gw_route, 0); - nm_warning ("(%s): failed to set IPv4 default route (pass #2): %d", + nm_log_err (LOGD_DEVICE | LOGD_IP4, + "(%s): failed to set IPv4 default route (pass #2): %d", iface, err); } else success = TRUE; @@ -993,7 +1013,8 @@ check_one_route (struct nl_object *object, void *user_data) err = rtnl_route_del (nm_netlink_get_default_handle (), route, 0); if (err < 0) { - nm_warning ("(%s) error %d returned from rtnl_route_del(): %s", + nm_log_err (LOGD_DEVICE, + "(%s): error %d returned from rtnl_route_del(): %s", data->iface, err, nl_geterror()); } } From 27a9ea5bede4de8d526261188a09f8deb3be6a36 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:13:38 -0700 Subject: [PATCH 052/105] wifi: enable quality debugging --- src/nm-device-wifi.c | 49 +++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 68f59b6f96..146d93cbff 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -60,8 +60,6 @@ static gboolean impl_device_get_access_points (NMDeviceWifi *device, #include "nm-device-wifi-glue.h" -/* #define IW_QUAL_DEBUG */ - /* All of these are in seconds */ #define SCAN_INTERVAL_MIN 0 #define SCAN_INTERVAL_STEP 20 @@ -1475,17 +1473,16 @@ wireless_qual_to_percent (const struct iw_quality *qual, g_return_val_if_fail (qual != NULL, -1); g_return_val_if_fail (max_qual != NULL, -1); -#ifdef IW_QUAL_DEBUG -nm_debug ("QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X", -(__s8)qual->qual, qual->qual, qual->qual, -(__s8)qual->level, qual->level, qual->level, -(__s8)qual->noise, qual->noise, qual->noise, -qual->updated, -(__s8)max_qual->qual, max_qual->qual, max_qual->qual, -(__s8)max_qual->level, max_qual->level, max_qual->level, -(__s8)max_qual->noise, max_qual->noise, max_qual->noise, -max_qual->updated); -#endif + nm_log_dbg (LOGD_WIFI, + "QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X", + (__s8) qual->qual, qual->qual, qual->qual, + (__s8) qual->level, qual->level, qual->level, + (__s8) qual->noise, qual->noise, qual->noise, + qual->updated, + (__s8) max_qual->qual, max_qual->qual, max_qual->qual, + (__s8) max_qual->level, max_qual->level, max_qual->level, + (__s8) max_qual->noise, max_qual->noise, max_qual->noise, + max_qual->updated); /* Try using the card's idea of the signal quality first as long as it tells us what the max quality is. * Drivers that fill in quality values MUST treat them as percentages, ie the "Link Quality" MUST be @@ -1510,8 +1507,7 @@ max_qual->updated); && !(qual->updated & IW_QUAL_LEVEL_INVALID) /* Must have valid qual->level */ && ( ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */ || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))) /* OR valid qual->noise */ - ) - { + ) { /* Absolute power values (dBm) */ /* Reasonable fallbacks for dumb drivers that don't specify either level. */ @@ -1533,9 +1529,8 @@ max_qual->updated); level_percent = (int)(100 - 70 *( ((double)max_level - (double)level) / ((double)max_level - (double)noise))); -#ifdef IW_QUAL_DEBUG - nm_debug ("QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.", level_percent, max_level, level, noise); -#endif + nm_log_dbg (LOGD_WIFI, "QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.", + level_percent, max_level, level, noise); } else if ( (max_qual->level != 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level as upper bound */ && !(qual->updated & IW_QUAL_LEVEL_INVALID)) { @@ -1546,24 +1541,18 @@ max_qual->updated); /* Signal level is relavtive (0 -> max_qual->level) */ level = CLAMP (level, 0, max_qual->level); level_percent = (int)(100 * ((double)level / (double)max_qual->level)); -#ifdef IW_QUAL_DEBUG - nm_debug ("QL2: level_percent is %d. max_level %d, level %d.", level_percent, max_qual->level, level); -#endif - } - else if (percent == -1) - { -#ifdef IW_QUAL_DEBUG - nm_debug ("QL: Could not get quality %% value from driver. Driver is probably buggy."); -#endif + nm_log_dbg (LOGD_WIFI, "QL2: level_percent is %d. max_level %d, level %d.", + level_percent, max_qual->level, level); + } else if (percent == -1) { + nm_log_dbg (LOGD_WIFI, "QL: Could not get quality %% value from driver. Driver is probably buggy."); } /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */ if ((percent < 1) && (level_percent >= 0)) percent = level_percent; -#ifdef IW_QUAL_DEBUG - nm_debug ("QL: Final quality percent is %d (%d).", percent, CLAMP (percent, 0, 100)); -#endif + nm_log_dbg (LOGD_WIFI, "QL: Final quality percent is %d (%d).", + percent, CLAMP (percent, 0, 100)); return (CLAMP (percent, 0, 100)); } From e8b36c2318b5f3bca842cd359755fb3b4203ed46 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:24:12 -0700 Subject: [PATCH 053/105] wifi: log in the wifi domain too --- src/nm-device-wifi.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 146d93cbff..edab55d02c 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -395,7 +395,8 @@ wireless_get_range (NMDeviceWifi *self, success = TRUE; break; } else if (errno != EAGAIN) { - nm_log_err (LOGD_HW, "(%s): couldn't get driver range information (%d).", + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): couldn't get driver range information (%d).", iface, errno); break; } @@ -404,7 +405,7 @@ wireless_get_range (NMDeviceWifi *self, } if (i <= 0) { - nm_log_warn (LOGD_HW, + nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s): driver took too long to respond to IWRANGE query.", iface); } @@ -430,7 +431,8 @@ real_get_generic_capabilities (NMDevice *dev) /* Check for Wireless Extensions support >= 16 for wireless devices */ if ((response_len < 300) || (range.we_version_compiled < 16)) { - nm_log_err (LOGD_HW, "(%s): driver's Wireless Extensions version (%d) is too old.", + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): driver's Wireless Extensions version (%d) is too old.", iface, range.we_version_compiled); return NM_DEVICE_CAP_NONE; } @@ -595,11 +597,13 @@ constructor (GType type, scan_capa_range = (struct iw_range_with_scan_capa *) ⦥ if (scan_capa_range->scan_capa & NM_IW_SCAN_CAPA_ESSID) { priv->has_scan_capa_ssid = TRUE; - nm_log_info (LOGD_HW, "(%s): driver supports SSID scans (scan_capa 0x%02X).", + nm_log_info (LOGD_HW | LOGD_WIFI, + "(%s): driver supports SSID scans (scan_capa 0x%02X).", nm_device_get_iface (NM_DEVICE (self)), scan_capa_range->scan_capa); } else { - nm_log_info (LOGD_HW, "(%s): driver does not support SSID scans (scan_capa 0x%02X).", + nm_log_info (LOGD_HW | LOGD_WIFI, + "(%s): driver does not support SSID scans (scan_capa 0x%02X).", nm_device_get_iface (NM_DEVICE (self)), scan_capa_range->scan_capa); } @@ -1358,7 +1362,8 @@ nm_device_wifi_get_mode (NMDeviceWifi *self) } } else { if (errno != ENODEV) { - nm_log_warn (LOGD_HW, "(%s): error %d getting card mode", + nm_log_warn (LOGD_HW | LOGD_WIFI, + "(%s): error %d getting card mode", iface, strerror (errno)); } } @@ -1410,7 +1415,8 @@ nm_device_wifi_set_mode (NMDeviceWifi *self, const NM80211Mode mode) if (ioctl (fd, SIOCSIWMODE, &wrq) < 0) { if (errno != ENODEV) { - nm_log_err (LOGD_HW, "(%s): error setting mode %d", + nm_log_err (LOGD_HW | LOGD_WIFI, + "(%s): error setting mode %d", iface, mode, strerror (errno)); } } else @@ -1447,7 +1453,8 @@ nm_device_wifi_get_frequency (NMDeviceWifi *self) strncpy (wrq.ifr_name, iface, IFNAMSIZ); if (ioctl (fd, SIOCGIWFREQ, &wrq) < 0) { - nm_log_warn (LOGD_HW, "(%s): error getting frequency: %s", + nm_log_warn (LOGD_HW | LOGD_WIFI, + "(%s): error getting frequency: %s", iface, strerror (errno)); } else freq = iw_freq_to_uint32 (&wrq.u.freq); @@ -1588,7 +1595,7 @@ nm_device_wifi_get_ssid (NMDeviceWifi *self) strncpy (wrq.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ); if (ioctl (sk, SIOCGIWESSID, &wrq) < 0) { - nm_log_err (LOGD_HW, "(%s): couldn't get SSID: %d", + nm_log_err (LOGD_HW | LOGD_WIFI, "(%s): couldn't get SSID: %d", nm_device_get_iface (NM_DEVICE (self)), errno); goto out; } @@ -2850,7 +2857,7 @@ real_update_hw_address (NMDevice *dev) memset (&req, 0, sizeof (struct ifreq)); strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_log_err (LOGD_HW, "(%s) error getting hardware address: %d", + nm_log_err (LOGD_HW | LOGD_WIFI, "(%s) error getting hardware address: %d", nm_device_get_iface (dev), errno); goto out; } From 5eeef57581145a6ff3561ed2a8ef0bf5df87e132 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:24:25 -0700 Subject: [PATCH 054/105] wired: update logging --- src/nm-device-ethernet.c | 159 +++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 65 deletions(-) diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index abc282c6f0..4515ceffb1 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -51,7 +51,7 @@ #include "nm-setting-8021x.h" #include "nm-setting-pppoe.h" #include "ppp-manager/nm-ppp-manager.h" -#include "nm-utils.h" +#include "nm-logging.h" #include "nm-properties-changed-signal.h" #include "nm-dhcp-manager.h" @@ -227,11 +227,11 @@ set_carrier (NMDeviceEthernet *self, g_object_notify (G_OBJECT (self), NM_DEVICE_ETHERNET_CARRIER); state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - nm_info ("(%s): carrier now %s (device state %d%s)", - nm_device_get_iface (NM_DEVICE (self)), - carrier ? "ON" : "OFF", - state, - defer_action ? ", deferring action for 4 seconds" : ""); + nm_log_info (LOGD_HW | LOGD_ETHER, "(%s): carrier now %s (device state %d%s)", + nm_device_get_iface (NM_DEVICE (self)), + carrier ? "ON" : "OFF", + state, + defer_action ? ", deferring action for 4 seconds" : ""); if (defer_action) priv->carrier_action_defer_id = g_timeout_add_seconds (4, carrier_action_defer_cb, self); @@ -331,30 +331,36 @@ constructor (GType type, priv->ifindex, &ifflags, &error)) { - nm_warning ("couldn't get initial carrier state: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_HW | LOGD_ETHER, + "(%s): couldn't get initial carrier state: (%d) %s", + nm_device_get_iface (NM_DEVICE (self)), + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_clear_error (&error); } else priv->carrier = !!(ifflags & IFF_LOWER_UP); - nm_info ("(%s): carrier is %s", - nm_device_get_iface (NM_DEVICE (self)), - priv->carrier ? "ON" : "OFF"); + nm_log_info (LOGD_HW | LOGD_ETHER, + "(%s): carrier is %s", + nm_device_get_iface (NM_DEVICE (self)), + priv->carrier ? "ON" : "OFF"); /* Request link state again just in case an error occurred getting the * initial link state. */ if (!nm_netlink_monitor_request_status (priv->monitor, &error)) { - nm_warning ("couldn't request carrier state: (%d) %s", - error ? error->code : -1, - (error && error->message) ? error->message : "unknown"); + nm_log_warn (LOGD_HW | LOGD_ETHER, + "(%s): couldn't request carrier state: (%d) %s", + nm_device_get_iface (NM_DEVICE (self)), + error ? error->code : -1, + (error && error->message) ? error->message : "unknown"); g_clear_error (&error); } } else { - nm_info ("(%s): driver '%s' does not support carrier detection.", - nm_device_get_iface (self), - nm_device_get_driver (self)); + nm_log_info (LOGD_HW | LOGD_ETHER, + "(%s): driver '%s' does not support carrier detection.", + nm_device_get_iface (self), + nm_device_get_driver (self)); priv->carrier = TRUE; } @@ -473,7 +479,7 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_HW, "couldn't open control socket."); return 0; } @@ -508,15 +514,16 @@ real_update_hw_address (NMDevice *dev) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_warn (LOGD_HW, "couldn't open control socket."); return; } memset (&req, 0, sizeof (struct ifreq)); strncpy (req.ifr_name, nm_device_get_iface (dev), IFNAMSIZ); if (ioctl (fd, SIOCGIFHWADDR, &req) < 0) { - nm_warning ("%s: (%s) error getting hardware address: %d", - __func__, nm_device_get_iface (dev), errno); + nm_log_err (LOGD_HW | LOGD_ETHER, + "(%s) error getting hardware address: %d", + nm_device_get_iface (dev), errno); goto out; } @@ -670,7 +677,8 @@ real_connection_secrets_updated (NMDevice *dev, if (!strcmp (setting_name, NM_SETTING_802_1X_SETTING_NAME)) { valid = TRUE; } else { - nm_warning ("Ignoring updated secrets for setting '%s'.", setting_name); + nm_log_warn (LOGD_DEVICE, "Ignoring updated secrets for setting '%s'.", + setting_name); } } @@ -827,8 +835,10 @@ link_timeout_cb (gpointer user_data) if (!setting_name) goto time_out; - nm_info ("Activation (%s/wired): disconnected during authentication," - " asking for new key.", nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): disconnected during authentication," + " asking for new key.", + nm_device_get_iface (dev)); supplicant_interface_release (self); nm_device_state_changed (dev, NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); @@ -842,7 +852,8 @@ link_timeout_cb (gpointer user_data) return FALSE; time_out: - nm_info ("%s: link timed out.", nm_device_get_iface (dev)); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "(%s): link timed out.", nm_device_get_iface (dev)); nm_device_state_changed (dev, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT); return FALSE; @@ -863,7 +874,7 @@ schedule_state_handler (NMDeviceEthernet *self, task = g_slice_new0 (SupplicantStateTask); if (!task) { - nm_warning ("Not enough memory to process supplicant manager state change."); + nm_log_err (LOGD_DEVICE, "Not enough memory to process supplicant manager state change."); return FALSE; } @@ -906,10 +917,11 @@ supplicant_mgr_state_cb (NMSupplicantInterface * iface, guint32 old_state, gpointer user_data) { - nm_info ("(%s): supplicant manager state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_manager_state_to_string (old_state), - nm_supplicant_manager_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s): supplicant manager state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_manager_state_to_string (old_state), + nm_supplicant_manager_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_mgr_state_cb_handler, @@ -936,7 +948,7 @@ build_supplicant_config (NMDeviceEthernet *self) security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X)); if (!nm_supplicant_config_add_setting_8021x (config, security, con_path, TRUE)) { - nm_warning ("Couldn't add 802.1X security setting to supplicant config."); + nm_log_warn (LOGD_DEVICE, "Couldn't add 802.1X security setting to supplicant config."); g_object_unref (config); config = NULL; } @@ -962,11 +974,17 @@ supplicant_iface_state_cb_handler (gpointer user_data) success = nm_supplicant_interface_set_config (priv->supplicant.iface, config); g_object_unref (config); - if (!success) - nm_warning ("Activation (%s/wired): couldn't send security " - "configuration to the supplicant.", iface); - } else - nm_warning ("Activation (%s/wired): couldn't build security configuration.", iface); + if (!success) { + nm_log_err (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): couldn't send security " + "configuration to the supplicant.", + iface); + } + } else { + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): couldn't build security configuration.", + iface); + } if (!success) nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED); @@ -990,10 +1008,11 @@ supplicant_iface_state_cb (NMSupplicantInterface * iface, gpointer user_data) { - nm_info ("(%s): supplicant interface state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_interface_state_to_string (old_state), - nm_supplicant_interface_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s): supplicant interface state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_interface_state_to_string (old_state), + nm_supplicant_interface_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_iface_state_cb_handler, @@ -1016,8 +1035,9 @@ supplicant_iface_connection_state_cb_handler (gpointer user_data) * schedule the next activation stage. */ if (nm_device_get_state (dev) == NM_DEVICE_STATE_CONFIG) { - nm_info ("Activation (%s/wired) Stage 2 of 5 (Device Configure) successful.", - nm_device_get_iface (dev)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired) Stage 2 of 5 (Device Configure) successful.", + nm_device_get_iface (dev)); nm_device_activate_schedule_stage3_ip_config_start (dev); } } else if (task->new_state == NM_SUPPLICANT_INTERFACE_CON_STATE_DISCONNECTED) { @@ -1040,10 +1060,11 @@ supplicant_iface_connection_state_cb (NMSupplicantInterface * iface, guint32 old_state, gpointer user_data) { - nm_info ("(%s) supplicant connection state: %s -> %s", - nm_device_get_iface (NM_DEVICE (user_data)), - nm_supplicant_interface_connection_state_to_string (old_state), - nm_supplicant_interface_connection_state_to_string (new_state)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "(%s) supplicant connection state: %s -> %s", + nm_device_get_iface (NM_DEVICE (user_data)), + nm_supplicant_interface_connection_state_to_string (old_state), + nm_supplicant_interface_connection_state_to_string (new_state)); schedule_state_handler (NM_DEVICE_ETHERNET (user_data), supplicant_iface_connection_state_cb_handler, @@ -1075,8 +1096,9 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface *iface, NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); guint id; - nm_info ("Activation (%s/wired): association request to the supplicant failed: %s - %s", - nm_device_get_iface (NM_DEVICE (self)), name, message); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): association request to the supplicant failed: %s - %s", + nm_device_get_iface (NM_DEVICE (self)), name, message); if (priv->supplicant.iface_con_error_cb_id) g_source_remove (priv->supplicant.iface_con_error_cb_id); @@ -1120,8 +1142,9 @@ handle_auth_or_fail (NMDeviceEthernet *self, NULL); g_object_set_data (G_OBJECT (connection), WIRED_SECRETS_TRIES, GUINT_TO_POINTER (++tries)); - } else - nm_warning ("Cleared secrets, but setting didn't need any secrets."); + } else { + nm_log_info (LOGD_DEVICE, "Cleared secrets, but setting didn't need any secrets."); + } return NM_ACT_STAGE_RETURN_POSTPONE; } @@ -1140,15 +1163,17 @@ supplicant_connection_timeout_cb (gpointer user_data) iface = nm_device_get_iface (device); /* Authentication failed, encryption key is probably bad */ - nm_info ("Activation (%s/wired): association took too long.", iface); + nm_log_warn (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): association took too long.", iface); supplicant_interface_release (self); req = nm_device_get_act_request (device); g_assert (req); - if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) - nm_info ("Activation (%s/wired): asking for new secrets", iface); - else + if (handle_auth_or_fail (self, req, TRUE) == NM_ACT_STAGE_RETURN_POSTPONE) { + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): asking for new secrets", iface); + } else nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_NO_SECRETS); return FALSE; @@ -1165,7 +1190,9 @@ supplicant_interface_init (NMDeviceEthernet *self) /* Create supplicant interface */ priv->supplicant.iface = nm_supplicant_manager_get_iface (priv->supplicant.mgr, iface, FALSE); if (!priv->supplicant.iface) { - nm_warning ("Couldn't initialize supplicant interface for %s.", iface); + nm_log_err (LOGD_DEVICE | LOGD_ETHER, + "Couldn't initialize supplicant interface for %s.", + iface); supplicant_interface_release (self); return FALSE; @@ -1213,7 +1240,7 @@ nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *reason) connection = nm_act_request_get_connection (nm_device_get_act_request (NM_DEVICE (self))); security = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X)); if (!security) { - nm_warning ("Invalid or missing 802.1X security"); + nm_log_err (LOGD_DEVICE, "Invalid or missing 802.1X security"); *reason = NM_DEVICE_STATE_REASON_CONFIG_FAILED; return ret; } @@ -1226,15 +1253,17 @@ nm_8021x_stage2_config (NMDeviceEthernet *self, NMDeviceStateReason *reason) if (setting_name) { NMActRequest *req = nm_device_get_act_request (NM_DEVICE (self)); - nm_info ("Activation (%s/wired): connection '%s' has security, but secrets are required.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): connection '%s' has security, but secrets are required.", + iface, nm_setting_connection_get_id (s_connection)); ret = handle_auth_or_fail (self, req, FALSE); if (ret != NM_ACT_STAGE_RETURN_POSTPONE) *reason = NM_DEVICE_STATE_REASON_NO_SECRETS; } else { - nm_info ("Activation (%s/wired): connection '%s' requires no security. No secrets needed.", - iface, nm_setting_connection_get_id (s_connection)); + nm_log_info (LOGD_DEVICE | LOGD_ETHER, + "Activation (%s/wired): connection '%s' requires no security. No secrets needed.", + iface, nm_setting_connection_get_id (s_connection)); if (supplicant_interface_init (self)) ret = NM_ACT_STAGE_RETURN_POSTPONE; @@ -1311,8 +1340,8 @@ pppoe_stage3_ip4_config_start (NMDeviceEthernet *self, NMDeviceStateReason *reas self); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_warning ("(%s): PPPoE failed to start: %s", - nm_device_get_iface (NM_DEVICE (self)), err->message); + nm_log_warn (LOGD_DEVICE, "(%s): PPPoE failed to start: %s", + nm_device_get_iface (NM_DEVICE (self)), err->message); g_error_free (err); g_object_unref (priv->ppp_manager); @@ -1880,7 +1909,7 @@ supports_ethtool_carrier_detect (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return FALSE; } @@ -1937,7 +1966,7 @@ supports_mii_carrier_detect (NMDeviceEthernet *self) fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) { - nm_warning ("couldn't open control socket."); + nm_log_err (LOGD_HW, "couldn't open control socket."); return 0; } From f354bd3d9fc4653445f565eea4e43d8e4f0ffaf4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:33:49 -0700 Subject: [PATCH 055/105] logging: allow OLPC mesh logging to be used --- src/logging/nm-logging.c | 1 + src/main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 3d8e99b3df..980742bedb 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -78,6 +78,7 @@ static const LogDesc domain_descs[] = { { LOGD_SUSPEND, "SUSPEND" }, { LOGD_CORE, "CORE" }, { LOGD_DEVICE, "DEVICE" }, + { LOGD_OLPC_MESH, "OLPC" }, { 0, NULL } }; diff --git a/src/main.c b/src/main.c index 1974ec19b7..da317b13c6 100644 --- a/src/main.c +++ b/src/main.c @@ -462,7 +462,7 @@ main (int argc, char *argv[]) { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, - "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE]", + "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]", "HW,RFKILL,WIFI" }, {NULL} }; From e7877a0036bd5ce1a4cbe1ab00ed9d85755e585d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:36:47 -0700 Subject: [PATCH 056/105] logging: adjust default domains to match previous log verbosity --- src/logging/nm-logging.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 980742bedb..267fa0a287 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -39,7 +39,10 @@ static guint32 log_level = LOGL_INFO; static guint32 log_domains = \ - LOGD_CORE | LOGD_HW | LOGD_RFKILL | LOGD_SUSPEND | LOGD_MB | LOGD_BT; + LOGD_HW | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \ + LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_IP4 | LOGD_IP6 | LOGD_AUTOIP4 | \ + LOGD_DNS | LOGD_VPN | LOGD_SHARING | LOGD_SUPPLICANT | LOGD_USER_SET | \ + LOGD_SYS_SET | LOGD_SUSPEND | LOGD_CORE | LOGD_DEVICE | LOGD_OLPC_MESH; typedef struct { guint32 num; From 0d0503f21a6fa7d3b448035be487f8b1d5742652 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 13:40:27 -0700 Subject: [PATCH 057/105] logging: fix loc/func confusion --- src/logging/nm-logging.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index 1b34614c7e..ba15268c34 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -63,21 +63,21 @@ enum { }; #define nm_log_err(domain, fmt, args...) \ - { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_ERR, fmt, ##args); } + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, fmt, ##args); } #define nm_log_warn(domain, fmt, args...) \ - { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_WARN, fmt, ##args); } + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_WARN, fmt, ##args); } #define nm_log_info(domain, fmt, args...) \ - { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_INFO, fmt, ##args); } + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_INFO, fmt, ##args); } #define nm_log_dbg(domain, fmt, args...) \ - { _nm_log (G_STRFUNC, G_STRLOC, domain, LOGL_DEBUG, fmt, ##args); } + { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_DEBUG, fmt, ##args); } #define nm_log(domain, level, fmt, args...) \ - { _nm_log (G_STRFUNC, G_STRLOC, domain, level, fmt, ##args); } + { _nm_log (G_STRLOC, G_STRFUNC, domain, level, fmt, ##args); } -void _nm_log (const char *func, const char *loc, +void _nm_log (const char *loc, const char *func, guint32 domain, guint32 level, const char *fmt, ...); From 637a912545ff600c31a09cfd27ba308bd3da02be Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:08:34 -0700 Subject: [PATCH 058/105] logging: fix log domain parsing --- src/logging/nm-logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 267fa0a287..61dffedc05 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -122,7 +122,7 @@ nm_logging_setup (const char *level, const char *domains, GError **error) for (diter = &domain_descs[0]; diter->name; diter++) { if (!strcasecmp (diter->name, *iter)) { - new_domains &= diter->num; + new_domains |= diter->num; found = TRUE; break; } From ee58ac80bfcf923152c8eace005705740593daad Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:17:43 -0700 Subject: [PATCH 059/105] wifi: better debug log formatting --- src/nm-wifi-ap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c index ba865cfbff..80b69a3980 100644 --- a/src/nm-wifi-ap.c +++ b/src/nm-wifi-ap.c @@ -697,25 +697,25 @@ nm_ap_print_self (NMAccessPoint *ap, { NMAccessPointPrivate *priv; + g_return_if_fail (ap != NULL); g_return_if_fail (NM_IS_AP (ap)); priv = NM_AP_GET_PRIVATE (ap); - nm_log_dbg (LOGD_WIFI_SCAN, "%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x " - "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld", + nm_log_dbg (LOGD_WIFI_SCAN, "%s'%s' (%p)", prefix, priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", - ap, - priv->timestamp.tv_sec, - priv->flags, - priv->wpa_flags, - priv->rsn_flags, - MAC_ARG (priv->address.ether_addr_octet), - priv->strength, - priv->freq, - priv->max_bitrate, - priv->mode, - priv->last_seen); + ap); + nm_log_dbg (LOGD_WIFI_SCAN, " BSSID " MAC_FMT, MAC_ARG (priv->address.ether_addr_octet)); + nm_log_dbg (LOGD_WIFI_SCAN, " mode %d", priv->mode); + nm_log_dbg (LOGD_WIFI_SCAN, " timestamp %ld", priv->timestamp.tv_sec); + nm_log_dbg (LOGD_WIFI_SCAN, " flags 0x%X", priv->flags); + nm_log_dbg (LOGD_WIFI_SCAN, " wpa flags 0x%X", priv->wpa_flags); + nm_log_dbg (LOGD_WIFI_SCAN, " rsn flags 0x%X", priv->rsn_flags); + nm_log_dbg (LOGD_WIFI_SCAN, " quality %d", priv->strength); + nm_log_dbg (LOGD_WIFI_SCAN, " frequency %d", priv->freq); + nm_log_dbg (LOGD_WIFI_SCAN, " max rate %d", priv->max_bitrate); + nm_log_dbg (LOGD_WIFI_SCAN, " last-seen %ld", priv->last_seen); } const char * From 6602813ffb7cee53f7afc2f3591bec736afd87ad Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:31:35 -0700 Subject: [PATCH 060/105] wifi: better scan debug logging --- src/nm-device-wifi.c | 111 ++++++++++++++++++++++++++++++++----------- 1 file changed, 82 insertions(+), 29 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index edab55d02c..858f2e546c 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -181,10 +181,6 @@ struct _NMDeviceWifiPrivate { static guint32 nm_device_wifi_get_frequency (NMDeviceWifi *self); -#if DEBUG -static void nm_device_wifi_ap_list_print (NMDeviceWifi *self); -#endif - static gboolean request_wireless_scan (gpointer user_data); static void schedule_scan (NMDeviceWifi *self, gboolean backoff); @@ -759,6 +755,8 @@ supplicant_interface_release (NMDeviceWifi *self) /* Reset the scan interval to be pretty frequent when disconnected */ priv->scan_interval = SCAN_INTERVAL_MIN + SCAN_INTERVAL_STEP; + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): reset scanning interval to %d seconds", + nm_device_get_iface (NM_DEVICE (self))); remove_supplicant_interface_error_handler (self); @@ -1298,12 +1296,12 @@ nm_device_wifi_ap_list_print (NMDeviceWifi *self) g_return_if_fail (NM_IS_DEVICE_WIFI (self)); - nm_log_dbg (LOGD_WIFI_SCAN, "AP_LIST_PRINT:"); + nm_log_dbg (LOGD_WIFI_SCAN, "Current AP list:"); for (elt = priv->ap_list; elt; elt = g_slist_next (elt), i++) { NMAccessPoint * ap = NM_AP (elt->data); - nm_ap_print_self (ap, "::\t"); + nm_ap_print_self (ap, "AP: "); } - nm_log_dbg (LOGD_WIFI_SCAN, "AP_LIST_PRINT: done"); + nm_log_dbg (LOGD_WIFI_SCAN, "Current AP list: done"); } static gboolean @@ -1778,10 +1776,16 @@ request_wireless_scan (gpointer user_data) gboolean backoff = FALSE; if (check_scanning_allowed (self)) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scanning requested", + nm_device_get_iface (NM_DEVICE (self))); + if (nm_supplicant_interface_request_scan (priv->supplicant.iface)) { /* success */ backoff = TRUE; } + } else { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan requested but not allowed at this time", + nm_device_get_iface (NM_DEVICE (self))); } priv->pending_scan_id = 0; @@ -1811,13 +1815,13 @@ schedule_scan (NMDeviceWifi *self, gboolean backoff) } if (!priv->pending_scan_id) { - guint factor = 2; + guint factor = 2, next_scan = priv->scan_interval; if ( nm_device_is_activating (NM_DEVICE (self)) || (nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_ACTIVATED)) factor = 1; - priv->pending_scan_id = g_timeout_add_seconds (priv->scan_interval, + priv->pending_scan_id = g_timeout_add_seconds (next_scan, request_wireless_scan, self); @@ -1834,6 +1838,12 @@ schedule_scan (NMDeviceWifi *self, gboolean backoff) */ priv->scan_interval = 5; } + + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scheduled scan in %d seconds (interval now %d seconds)", + nm_device_get_iface (NM_DEVICE (self)), + next_scan, + priv->scan_interval); + } } @@ -1855,6 +1865,10 @@ supplicant_iface_scan_request_result_cb (NMSupplicantInterface *iface, gboolean success, NMDeviceWifi *self) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan request %s", + nm_device_get_iface (NM_DEVICE (self)), + success ? "successful" : "failed"); + if (check_scanning_allowed (self)) schedule_scan (self, TRUE); } @@ -1864,11 +1878,15 @@ supplicant_iface_scan_results_cb (NMSupplicantInterface *iface, guint32 num_results, NMDeviceWifi *self) { + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): scan results available (%d APs found)", + nm_device_get_iface (NM_DEVICE (self)), + num_results); if (num_results == 0) { /* ensure that old APs get culled, which otherwise only * happens when there are actual scan results to process. */ cull_scan_list (self); + nm_device_wifi_ap_list_print (self); } } @@ -2022,11 +2040,12 @@ static void cull_scan_list (NMDeviceWifi *self) { NMDeviceWifiPrivate *priv; - GTimeVal cur_time; - GSList * outdated_list = NULL; - GSList * elt; - NMActRequest * req; - const char * cur_ap_path = NULL; + GTimeVal cur_time; + GSList *outdated_list = NULL; + GSList *elt; + NMActRequest *req; + const char *cur_ap_path = NULL; + guint32 removed = 0, total = 0; g_return_if_fail (self != NULL); priv = NM_DEVICE_WIFI_GET_PRIVATE (self); @@ -2037,10 +2056,13 @@ cull_scan_list (NMDeviceWifi *self) if (req) cur_ap_path = nm_act_request_get_specific_object (req); + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): checking scan list for outdated APs", + nm_device_get_iface (NM_DEVICE (self))); + /* Walk the access point list and remove any access points older than * three times the inactive scan interval. */ - for (elt = priv->ap_list; elt; elt = g_slist_next (elt)) { + for (elt = priv->ap_list; elt; elt = g_slist_next (elt), total++) { NMAccessPoint * ap = NM_AP (elt->data); const glong ap_time = nm_ap_get_last_seen (ap); gboolean keep = FALSE; @@ -2058,13 +2080,31 @@ cull_scan_list (NMDeviceWifi *self) /* Remove outdated APs */ for (elt = outdated_list; elt; elt = g_slist_next (elt)) { - NMAccessPoint * outdated_ap = NM_AP (elt->data); + NMAccessPoint *outdated_ap = NM_AP (elt->data); + const struct ether_addr *bssid; + const GByteArray *ssid; + + bssid = nm_ap_get_address (outdated_ap); + ssid = nm_ap_get_ssid (outdated_ap); + nm_log_dbg (LOGD_WIFI_SCAN, + " removing %02x:%02x:%02x:%02x:%02x:%02x (%s%s%s)", + bssid->ether_addr_octet[0], bssid->ether_addr_octet[1], + bssid->ether_addr_octet[2], bssid->ether_addr_octet[3], + bssid->ether_addr_octet[4], bssid->ether_addr_octet[5], + ssid ? "'" : "", + ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)", + ssid ? "'" : ""); access_point_removed (self, outdated_ap); priv->ap_list = g_slist_remove (priv->ap_list, outdated_ap); g_object_unref (outdated_ap); + removed++; } g_slist_free (outdated_list); + + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): removed %d APs (of %d)", + nm_device_get_iface (NM_DEVICE (self)), + removed, total); } #define SET_QUALITY_MEMBER(qual_item, lc_member, uc_member) \ @@ -2123,20 +2163,23 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface *iface, return; ap = nm_ap_new_from_properties (properties); - if (!ap) - return; + if (ap) { + set_ap_strength_from_properties (self, ap, properties); - set_ap_strength_from_properties (self, ap, properties); + nm_ap_print_self (ap, "AP: "); - /* Add the AP to the device's AP list */ - merge_scanned_ap (self, ap); + /* Add the AP to the device's AP list */ + merge_scanned_ap (self, ap); + g_object_unref (ap); - /* Remove outdated access points */ - cull_scan_list (self); + /* Remove outdated access points */ + cull_scan_list (self); - nm_device_wifi_ap_list_print (self); - - g_object_unref (ap); + nm_device_wifi_ap_list_print (self); + } else { + nm_log_warn (LOGD_WIFI_SCAN, "(%s): invalid AP properties received", + nm_device_get_iface (NM_DEVICE (self))); + } } @@ -2327,6 +2370,9 @@ supplicant_iface_state_cb_handler (gpointer user_data) NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE); } + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): supplicant ready, requesting initial scan", + nm_device_get_iface (NM_DEVICE (self))); + /* Request a scan to get latest results */ cancel_pending_scan (self); request_wireless_scan (self); @@ -2571,10 +2617,17 @@ supplicant_iface_connection_error_cb (NMSupplicantInterface * iface, } static void -supplicant_iface_notify_scanning_cb (NMSupplicantInterface * iface, - GParamSpec * pspec, - NMDeviceWifi * self) +supplicant_iface_notify_scanning_cb (NMSupplicantInterface *iface, + GParamSpec *pspec, + NMDeviceWifi *self) { + gboolean scanning; + + scanning = nm_supplicant_interface_get_scanning (iface); + nm_log_dbg (LOGD_WIFI_SCAN, "(%s): now %s", + nm_device_get_iface (NM_DEVICE (self)), + scanning ? "scanning" : "not scanning"); + g_object_notify (G_OBJECT (self), "scanning"); } From 4e5cfab478cdca049779d7366b9eefd25e3bcabc Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:43:32 -0700 Subject: [PATCH 061/105] logging: fix multiple log level handling Ensure messages are only printed in the format their log level wants. --- src/logging/nm-logging.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 61dffedc05..446c7a4179 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -158,14 +158,14 @@ void _nm_log (const char *loc, msg = g_strdup_vprintf (fmt, args); va_end (args); - if (log_level & LOGL_DEBUG) { + if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) { g_get_current_time (&tv); syslog (LOG_DEBUG, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); - } else if (log_level & LOGL_INFO) + } else if ((log_level & LOGL_INFO) && (level == LOGL_INFO)) syslog (LOG_INFO, " %s\n", msg); - else if (log_level & LOGL_WARN) + else if ((log_level & LOGL_WARN) && (level == LOGL_WARN)) syslog (LOG_WARNING, " %s\n", msg); - else if (log_level & LOGL_ERR) { + else if ((log_level & LOGL_ERR) && (level == LOGL_ERR)) { g_get_current_time (&tv); syslog (LOG_ERR, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); } From df04e3f66c3fea440aac7bb93b6350bfaf60f075 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:46:03 -0700 Subject: [PATCH 062/105] udev: more debug logging of rfkill and udev --- src/nm-udev-manager.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index b1b49f510f..0ced962c27 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -82,6 +82,30 @@ nm_udev_manager_get_rfkill_state (NMUdevManager *self, RfKillType rtype) return NM_UDEV_MANAGER_GET_PRIVATE (self)->rfkill_states[rtype]; } +static const char * +rfkill_type_to_desc (RfKillType rtype) +{ + if (rtype == 0) + return "WiFi"; + else if (rtype == 1) + return "WWan"; + else if (rtype == 2) + return "WiMAX"; + return "unknown"; +} + +static const char * +rfkill_state_to_desc (RfKillState rstate) +{ + if (rstate == 0) + return "unblocked"; + else if (rstate == 1) + return "soft-blocked"; + else if (rstate == 2) + return "hard-blocked"; + return "unknown"; +} + static Killswitch * killswitch_new (GUdevDevice *device, RfKillType rtype) { @@ -175,6 +199,10 @@ recheck_killswitches (NMUdevManager *self) for (i = 0; i < RFKILL_TYPE_MAX; i++) { if (poll_states[i] != priv->rfkill_states[i]) { + nm_log_dbg (LOGD_RFKILL, "%s rfkill state now '%s'", + rfkill_type_to_desc (i), + rfkill_state_to_desc (poll_states[i])); + priv->rfkill_states[i] = poll_states[i]; g_signal_emit (self, signals[RFKILL_CHANGED], 0, i, priv->rfkill_states[i]); } @@ -230,7 +258,7 @@ add_one_killswitch (NMUdevManager *self, GUdevDevice *device) priv->killswitches = g_slist_prepend (priv->killswitches, ks); nm_log_info (LOGD_RFKILL, "found %s radio killswitch %s (at %s) (driver %s)", - str_type, + rfkill_type_to_desc (rtype), ks->name, ks->path, ks->driver ? ks->driver : ""); @@ -427,6 +455,9 @@ handle_uevent (GUdevClient *client, subsys = g_udev_device_get_subsystem (device); g_return_if_fail (subsys != NULL); + nm_log_dbg (LOGD_HW, "UDEV event: action '%s' subsys '%s' device '%s'", + action, subsys, g_udev_device_get_name (device)); + g_return_if_fail (!strcmp (subsys, "rfkill") || !strcmp (subsys, "net")); if (!strcmp (action, "add")) { From 71bdbf9c251004b103e381f75f363c72d805fd7a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:55:29 -0700 Subject: [PATCH 063/105] wifi: log ipw killswitch changes --- src/nm-device-wifi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 858f2e546c..a6c6282419 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -269,6 +269,7 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self) NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); char *contents = NULL; RfKillState state = RFKILL_UNBLOCKED; + const char *str_state = NULL; if ( priv->ipw_rfkill_path && g_file_get_contents (priv->ipw_rfkill_path, &contents, NULL, NULL)) { @@ -282,16 +283,23 @@ nm_device_wifi_get_ipw_rfkill_state (NMDeviceWifi *self) switch (contents[0]) { case '1': state = RFKILL_SOFT_BLOCKED; + str_state = "soft-blocked"; break; case '2': case '3': state = RFKILL_HARD_BLOCKED; + str_state = "hard-blocked"; break; case '0': + str_state = "unblocked"; default: break; } g_free (contents); + + nm_log_dbg (LOGD_RFKILL, "(%s): ipw rfkill state '%s'", + nm_device_get_iface (NM_DEVICE (self)), + str_state ? str_state : "(unknown)"); } return state; From 26efaaf1683643402fcf955e521d6954f90198e4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 14:55:43 -0700 Subject: [PATCH 064/105] core: more manager debug logging --- src/nm-manager.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index bb243e0c64..ed90dfa8e9 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1242,8 +1242,12 @@ manager_set_radio_enabled (NMManager *manager, RfKillType devtype = RFKILL_TYPE_UNKNOWN; g_object_get (G_OBJECT (iter->data), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL); - if (devtype == rstate->rtype) + if (devtype == rstate->rtype) { + nm_log_dbg (LOGD_RFKILL, "(%s): setting radio %s", + nm_device_get_iface (NM_DEVICE (iter->data)), + enabled ? "enabled" : "disabled"); nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (iter->data), enabled); + } } } @@ -1530,6 +1534,15 @@ add_device (NMManager *self, NMDevice *device) existing = nm_device_interface_connection_match_config (NM_DEVICE_INTERFACE (device), (const GSList *) connections); g_slist_free (connections); + + if (existing) { + NMSettingConnection *s_con; + + s_con = (NMSettingConnection *) nm_connection_get_setting (existing, NM_TYPE_SETTING_CONNECTION); + nm_log_dbg (LOGD_DEVICE, "(%s): found existing device connection '%s'", + nm_device_get_iface (device), + nm_setting_connection_get_id (s_con)); + } } /* Start the device if it's supposed to be managed */ @@ -1551,11 +1564,14 @@ add_device (NMManager *self, NMDevice *device) const char *ac_path; GError *error = NULL; + nm_log_dbg (LOGD_DEVICE, "(%s): will attempt to assume existing connection", + nm_device_get_iface (device)); + ac_path = internal_activate_device (self, device, existing, NULL, FALSE, TRUE, &error); if (ac_path) g_object_notify (G_OBJECT (self), NM_MANAGER_ACTIVE_CONNECTIONS); else { - nm_log_warn (LOGD_CORE, "assumed connection (%d) %s failed to activate: (%d) %s", + nm_log_warn (LOGD_DEVICE, "assumed connection (%d) %s failed to activate: (%d) %s", nm_connection_get_scope (existing), nm_connection_get_path (existing), error ? error->code : -1, From e92e321c4d99fe8e758210afbb0db12c08a4caff Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 15:10:12 -0700 Subject: [PATCH 065/105] po: update translatables --- po/POTFILES.in | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index 4369c5b994..2cf4d231c8 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -15,6 +15,7 @@ src/main.c src/dhcp-manager/nm-dhcp-dhclient.c src/dhcp-manager/nm-dhcp-manager.c src/ip6-manager/nm-netlink-listener.c +src/logging/nm-logging.c src/named-manager/nm-named-manager.c src/system-settings/nm-default-wired-connection.c system-settings/plugins/ifcfg-rh/reader.c From b0f056d787192b0db3c1869ccdcb309774ca5c21 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 16:41:44 -0700 Subject: [PATCH 066/105] core: log device delayed state transitions --- src/nm-device.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/nm-device.c b/src/nm-device.c index 716401a583..e10c9049ed 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -2345,10 +2345,14 @@ delayed_transitions_clear (NMDevice *self) NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); if (priv->failed_to_disconnected_id) { + nm_log_dbg (LOGD_DEVICE, "(%s): clearing failed->disconnected transition", + nm_device_get_iface (self)); g_source_remove (priv->failed_to_disconnected_id); priv->failed_to_disconnected_id = 0; } if (priv->unavailable_to_disconnected_id) { + nm_log_dbg (LOGD_DEVICE, "(%s): clearing unavailable->disconnected transition", + nm_device_get_iface (self)); g_source_remove (priv->unavailable_to_disconnected_id); priv->unavailable_to_disconnected_id = 0; } @@ -3294,6 +3298,8 @@ failed_to_disconnected (gpointer user_data) NMDevice *self = NM_DEVICE (user_data); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + nm_log_dbg (LOGD_DEVICE, "(%s): running failed->disconnected transition", + nm_device_get_iface (self)); priv->failed_to_disconnected_id = 0; nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); return FALSE; @@ -3305,6 +3311,8 @@ unavailable_to_disconnected (gpointer user_data) NMDevice *self = NM_DEVICE (user_data); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); + nm_log_dbg (LOGD_DEVICE, "(%s): running unavailable->disconnected transition", + nm_device_get_iface (self)); priv->unavailable_to_disconnected_id = 0; nm_device_state_changed (self, NM_DEVICE_STATE_DISCONNECTED, NM_DEVICE_STATE_REASON_NONE); return FALSE; @@ -3381,8 +3389,11 @@ nm_device_state_changed (NMDevice *device, * we can't change states again from the state handler for a variety of * reasons. */ - if (nm_device_is_available (device)) + if (nm_device_is_available (device)) { + nm_log_dbg (LOGD_WIFI, "(%s): device is available, will transition to DISCONNECTED", + nm_device_get_iface (device)); priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device); + } break; case NM_DEVICE_STATE_ACTIVATED: nm_log_info (LOGD_DEVICE, "Activation (%s) successful, device activated.", From 7fa8f29aaf8767631fb546e4fa3731e4a1a71586 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 7 Apr 2010 16:42:29 -0700 Subject: [PATCH 067/105] wifi: more supplicant/wifi debug logging To help debug wifi device availablility. --- src/nm-device-wifi.c | 29 ++++++++++++++++--- .../nm-supplicant-interface.c | 9 ++++-- .../nm-supplicant-manager.c | 3 ++ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index a6c6282419..6062c3c72e 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1208,16 +1208,25 @@ real_is_available (NMDevice *dev) NMSupplicantInterface *sup_iface; guint32 state; - if (!priv->enabled) + if (!priv->enabled) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because not enabled", + nm_device_get_iface (dev)); return FALSE; + } sup_iface = priv->supplicant.iface; - if (!sup_iface) + if (!sup_iface) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because supplicant not running", + nm_device_get_iface (dev)); return FALSE; + } state = nm_supplicant_interface_get_state (sup_iface); - if (state != NM_SUPPLICANT_INTERFACE_STATE_READY) + if (state != NM_SUPPLICANT_INTERFACE_STATE_READY) { + nm_log_dbg (LOGD_WIFI, "(%s): not available because supplicant interface not ready", + nm_device_get_iface (dev)); return FALSE; + } return TRUE; } @@ -3499,9 +3508,16 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) priv->enabled = enabled; + nm_log_dbg (LOGD_WIFI, "(%s): device now %s", + nm_device_get_iface (NM_DEVICE (device)), + enabled ? "enabled" : "disabled"); + state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); - if (state < NM_DEVICE_STATE_UNAVAILABLE) + if (state < NM_DEVICE_STATE_UNAVAILABLE) { + nm_log_dbg (LOGD_WIFI, "(%s): enable blocked by UNMANAGED state", + nm_device_get_iface (NM_DEVICE (device))); return; + } if (enabled) { gboolean no_firmware = FALSE, success; @@ -3511,6 +3527,9 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) nm_log_warn (LOGD_CORE, "not in expected unavailable state!"); if (!nm_device_hw_bring_up (NM_DEVICE (self), TRUE, &no_firmware)) { + nm_log_dbg (LOGD_WIFI, "(%s): enable blocked by failure to bring device up", + nm_device_get_iface (NM_DEVICE (device))); + /* The device sucks, or HAL was lying to us about the killswitch state */ priv->enabled = FALSE; return; @@ -3525,6 +3544,8 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) supplicant_interface_release (self); supplicant_interface_acquire (self); + nm_log_dbg (LOGD_WIFI, "(%s): enable waiting on supplicant state", + nm_device_get_iface (NM_DEVICE (device))); } else { nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE, diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 4307a9ebc2..da1a856d1b 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -768,6 +768,7 @@ static void nm_supplicant_interface_add_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; + NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); GError *err = NULL; char *path = NULL; @@ -782,13 +783,13 @@ nm_supplicant_interface_add_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpoi /* Interface already added, just try to get the interface */ nm_supplicant_interface_add_to_supplicant (info->interface, TRUE); } else { - nm_log_warn (LOGD_SUPPLICANT, "Unexpected supplicant error getting interface: %s", - err->message); + nm_log_err (LOGD_SUPPLICANT, "(%s): error getting interface: %s", + priv->dev, err->message); } g_error_free (err); } else { - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (info->interface); + nm_log_dbg (LOGD_SUPPLICANT, "(%s): interface added to supplicant", priv->dev); priv->object_path = path; @@ -887,6 +888,8 @@ nm_supplicant_interface_start (NMSupplicantInterface * self) /* Can only start the interface from INIT state */ g_return_if_fail (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT); + nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev); + state = nm_supplicant_manager_get_state (priv->smgr); if (state == NM_SUPPLICANT_MANAGER_STATE_IDLE) { nm_supplicant_interface_set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING); diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c index f8390437dc..a2cf58eb8f 100644 --- a/src/supplicant-manager/nm-supplicant-manager.c +++ b/src/supplicant-manager/nm-supplicant-manager.c @@ -288,9 +288,12 @@ nm_supplicant_manager_get_iface (NMSupplicantManager * self, } if (!iface) { + nm_log_dbg (LOGD_SUPPLICANT, "(%s): creating new supplicant interface", ifname); iface = nm_supplicant_interface_new (self, ifname, is_wireless); if (iface) priv->ifaces = g_slist_append (priv->ifaces, iface); + } else { + nm_log_dbg (LOGD_SUPPLICANT, "(%s): returning existing supplicant interface", ifname); } return iface; From 02002ef9d15ead885eccc46c278e6aa11a778f87 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 08:56:17 -0700 Subject: [PATCH 068/105] logging: add D-Bus method to change logging --- introspection/nm-manager.xml | 22 ++++++++++++++++++ src/logging/nm-logging.c | 45 +++++++++++++++++++++++++++++++++--- src/logging/nm-logging.h | 7 ++++++ src/nm-manager.c | 18 +++++++++++++++ 4 files changed, 89 insertions(+), 3 deletions(-) diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml index 8303f4d469..406b5cfd1e 100644 --- a/introspection/nm-manager.xml +++ b/introspection/nm-manager.xml @@ -96,6 +96,28 @@ + + + + Set logging verbosity and which operations are logged. + + + + One of [ERR, WARN, INFO, DEBUG]. + + + + + A combination of logging domains separated by commas (','), or "NONE" + to disable logging. Each domain enables logging for operations + related to that domain. Available domains are: [NONE, HW, RKILL, + ETHER, WIFI, BT, MB, DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, + DNS, VPN, SHARING, SUPPLICANT, USER_SET, SYS_SET, SUSPEND, CORE, + DEVICE, OLPC] + + + + Indicates if wireless is currently enabled or not. diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 446c7a4179..3e3efa4760 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -85,6 +85,40 @@ static const LogDesc domain_descs[] = { { 0, NULL } }; +/************************************************************************/ + +enum { + NM_LOGGING_ERROR_UNKNOWN_LEVEL = 0, + NM_LOGGING_ERROR_UNKNOWN_DOMAIN = 1, +}; + +#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC } + +GQuark +nm_logging_error_quark (void) +{ + static GQuark ret = 0; + + if (ret == 0) + ret = g_quark_from_static_string ("nm_logging_error"); + return ret; +} + +GType +nm_logging_error_get_type (void) +{ + static GType etype = 0; + + if (etype == 0) { + static const GEnumValue values[] = { + ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_LEVEL, "UnknownLevel"), + ENUM_ENTRY (NM_LOGGING_ERROR_UNKNOWN_DOMAIN, "UnknownDomain"), + { 0, 0, 0 } + }; + etype = g_enum_register_static ("NMLoggingError", values); + } + return etype; +} /************************************************************************/ @@ -108,18 +142,22 @@ nm_logging_setup (const char *level, const char *domains, GError **error) } if (!found) { - g_set_error (error, 0, 0, _("Unknown log level '%s'"), level); + g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_LEVEL, + _("Unknown log level '%s'"), level); return FALSE; } } /* domains */ if (domains && strlen (domains)) { - tmp = g_strsplit (domains, ",", 0); + tmp = g_strsplit_set (domains, ", ", 0); for (iter = tmp; iter && *iter; iter++) { const LogDesc *diter; gboolean found = FALSE; + if (!strlen (*iter)) + continue; + for (diter = &domain_descs[0]; diter->name; diter++) { if (!strcasecmp (diter->name, *iter)) { new_domains |= diter->num; @@ -129,7 +167,8 @@ nm_logging_setup (const char *level, const char *domains, GError **error) } if (!found) { - g_set_error (error, 0, 0, _("Unknown log domain '%s'"), *iter); + g_set_error (error, NM_LOGGING_ERROR, NM_LOGGING_ERROR_UNKNOWN_DOMAIN, + _("Unknown log domain '%s'"), *iter); return FALSE; } } diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index ba15268c34..4c381a24a3 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -23,6 +23,7 @@ #define NM_LOGGING_H #include +#include /* Log domains */ enum { @@ -62,6 +63,12 @@ enum { LOGL_DEBUG = 0x00000004 }; +#define NM_LOGGING_ERROR (nm_logging_error_quark ()) +#define NM_TYPE_LOGGING_ERROR (nm_logging_error_get_type ()) +GQuark nm_logging_error_quark (void); +GType nm_logging_error_get_type (void); + + #define nm_log_err(domain, fmt, args...) \ { _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, fmt, ##args); } diff --git a/src/nm-manager.c b/src/nm-manager.c index ed90dfa8e9..3189e3f76f 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -79,6 +79,11 @@ static gboolean impl_manager_deactivate_connection (NMManager *manager, static gboolean impl_manager_sleep (NMManager *manager, gboolean sleep, GError **err); +static gboolean impl_manager_set_logging (NMManager *manager, + const char *level, + const char *domains, + GError **error); + /* Legacy 0.6 compatibility interface */ static gboolean impl_manager_legacy_sleep (NMManager *manager, GError **err); @@ -2756,6 +2761,18 @@ impl_manager_legacy_state (NMManager *manager, guint32 *state, GError **err) return TRUE; } +static gboolean +impl_manager_set_logging (NMManager *manager, + const char *level, + const char *domains, + GError **error) +{ + if (nm_logging_setup (level, domains, error)) { + nm_log_info (LOGD_CORE, "logging: level '%s' domains '%s'", level, domains); + return TRUE; + } + return FALSE; +} /* Connections */ @@ -3353,5 +3370,6 @@ nm_manager_class_init (NMManagerClass *manager_class) &dbus_glib_nm_manager_object_info); dbus_g_error_domain_register (NM_MANAGER_ERROR, NULL, NM_TYPE_MANAGER_ERROR); + dbus_g_error_domain_register (NM_LOGGING_ERROR, "org.freedesktop.NetworkManager.Logging", NM_TYPE_LOGGING_ERROR); } From 7e5d6a42b05c856eb53fd4084629b9f7ca121be2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 09:11:00 -0700 Subject: [PATCH 069/105] logging: use --log-domains for consistency --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index da317b13c6..cce2939e39 100644 --- a/src/main.c +++ b/src/main.c @@ -461,7 +461,7 @@ main (int argc, char *argv[]) { "config", 0, 0, G_OPTION_ARG_FILENAME, &config, "Config file location", "/path/to/config.file" }, { "plugins", 0, 0, G_OPTION_ARG_STRING, &plugins, "List of plugins separated by ','", "plugin1,plugin2" }, { "log-level", 0, 0, G_OPTION_ARG_STRING, &log_level, "Log level: one of [ERR, WARN, INFO, DEBUG]", "INFO" }, - { "log-domain", 0, 0, G_OPTION_ARG_STRING, &log_domains, + { "log-domains", 0, 0, G_OPTION_ARG_STRING, &log_domains, "Log domains separated by ',': any combination of [NONE,HW,RKILL,ETHER,WIFI,BT,MB,DHCP4,DHCP6,PPP,WIFI_SCAN,IP4,IP6,AUTOIP4,DNS,VPN,SHARING,SUPPLICANT,USER_SET,SYS_SET,SUSPEND,CORE,DEVICE,OLPC]", "HW,RFKILL,WIFI" }, {NULL} From f72c00b984c6015a9ef63b1b9e28579f82f30848 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 09:16:27 -0700 Subject: [PATCH 070/105] man: add logging control options --- man/Makefile.am | 3 +++ man/NetworkManager.8.in | 16 ++++++++++++++-- man/NetworkManager.conf.5.in | 20 ++++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/man/Makefile.am b/man/Makefile.am index 670d9a741a..7cbc5a15fd 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -10,3 +10,6 @@ EXTRA_DIST = \ NetworkManager.conf.5.in \ nm-system-settings.conf.5.in \ nm-tool.1.in + +CLEANFILES = $(man_MANS) + diff --git a/man/NetworkManager.8.in b/man/NetworkManager.8.in index 2de7c262ab..4cd64c753a 100644 --- a/man/NetworkManager.8.in +++ b/man/NetworkManager.8.in @@ -8,7 +8,7 @@ .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS -.B NetworkManager [\-\-no\-daemon] [\-\-pid\-file=] [\-\-state\-file=] [\-\-config=] [\-\-plugins=,plugin2>,...] +.B NetworkManager [\-\-no\-daemon] [\-\-pid\-file=] [\-\-state\-file=] [\-\-config=] [\-\-plugins=,plugin2>,...] [\-\-log-level=] [\-\-log-domain=,,...] .SH DESCRIPTION The \fINetworkManager\fP daemon attempts to make networking configuration and operation as painless and automatic as possible by managing the primary network @@ -81,11 +81,23 @@ List plugins used to manage system-wide connection settings. This list has preference over plugins specified in the configuration file. Currently supported plugins are: keyfile, ifcfg\-rh, ifcfg\-suse, ifupdown. See \fBNetworkManager.conf\fP(5) for more information on the plugins. +.TP +.I "\-\-log-level= +Sets how much information NetworkManager sends to the log destination (usually +syslog's "daemon" facility). By default, only informational, warning, and error +messages are logged. See \fBNetworkManager.conf\fP(5) for more information on +log levels and domains. +.TP +.I "\-\-log-domains=,, ... +Sets which operations are logged to the log destination (usually syslog). By +default, most domains are logging-enabled. See \fBNetworkManager.conf\fP(5) for +more information on log levels and domains. .SH DEBUGGING The following environment variables are supported to help debugging. When used in conjunction with the "\-\-no\-daemon" option (thus echoing PPP and DHCP helper output to stdout) these can quickly help pinpoint the source of connection -issues. +issues. Also see the \-\-log- and \-\-log-domains to enable debug logging inside +NetworkManager itself. .TP .I "NM_PPP_DEBUG" When set to anything, causes NetworkManager to turn on PPP debugging in pppd, diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in index 3de273846e..783bafbda6 100644 --- a/man/NetworkManager.conf.5.in +++ b/man/NetworkManager.conf.5.in @@ -97,6 +97,26 @@ ignored by NetworkManager. Remember that NetworkManager controls the default rou so because the interface is ignored, NetworkManager may assign the default route to some other interface. When the option is missing, \fIfalse\fP value is taken as default. +.SS [logging] +This section controls NetworkManager's logging. Any settings here are +overridden by the --log-level and --log-domain command-line options. +.TP +.B level=\fI\fP +One of [ERR, WARN, INFO, DEBUG]. The ERR level logs only critical errors. WARN +logs warnings that may reflect operation. INFO logs various informational +messages that are useful for tracking state and operations. DEBUG enables +verbose logging for debugging purposes. Subsequent levels also log all messages +from earlier levels; thus setting the log level to INFO also logs error and +warning messages. +.TP +.B domains=\fI,, ...\fP +The following log domains are available: [NONE, HW, RKILL, ETHER, WIFI, BT, MB, +DHCP4, DHCP6, PPP, WIFI_SCAN, IP4, IP6, AUTOIP4, DNS, VPN, SHARING, SUPPLICANT, +USER_SET, SYS_SET, SUSPEND, CORE, DEVICE, OLPC]. When "NONE" is given by itself, +logging is disabled. MB = Mobile Broadband, USER_SET = user settings operations +and communication, SYS_SET = system settings service operations, OLPC = OLPC +Mesh device operations, CORE = core daemon operations, DEVICE = activation and +general interface operations. .SH "SEE ALSO" .BR http://live.gnome.org/NetworkManager/SystemSettings .sp From 8364ce7bac41591b7815e96fda9e32167163213b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 09:22:52 -0700 Subject: [PATCH 071/105] wired: debug logging for carrier detect support detection --- src/nm-device-ethernet.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 4515ceffb1..c64ebb8ed6 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -1919,13 +1919,18 @@ supports_ethtool_carrier_detect (NMDeviceEthernet *self) edata.cmd = ETHTOOL_GLINK; ifr.ifr_data = (char *) &edata; - if (ioctl (fd, SIOCETHTOOL, &ifr) < 0) + errno = 0; + if (ioctl (fd, SIOCETHTOOL, &ifr) < 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCETHTOOL failed: %d", errno); goto out; + } supports_ethtool = TRUE; out: close (fd); + nm_log_dbg (LOGD_HW | LOGD_ETHER, "ethtool %s supported", + supports_ethtool ? "is" : "not"); return supports_ethtool; } @@ -1949,8 +1954,13 @@ mdio_read (NMDeviceEthernet *self, int fd, struct ifreq *ifr, int location) mii = (struct mii_ioctl_data *) &ifr->ifr_ifru; mii->reg_num = location; - if (ioctl (fd, SIOCGMIIREG, ifr) == 0) + errno = 0; + if (ioctl (fd, SIOCGMIIREG, ifr) == 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIREG result 0x%X", mii->val_out); val = mii->val_out; + } else { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIREG failed: %d", errno); + } return val; } @@ -1973,12 +1983,17 @@ supports_mii_carrier_detect (NMDeviceEthernet *self) memset (&ifr, 0, sizeof (struct ifreq)); strncpy (ifr.ifr_name, nm_device_get_iface (NM_DEVICE (self)), IFNAMSIZ); - if (ioctl (fd, SIOCGMIIPHY, &ifr) < 0) + errno = 0; + if (ioctl (fd, SIOCGMIIPHY, &ifr) < 0) { + nm_log_dbg (LOGD_HW | LOGD_ETHER, "SIOCGMIIPHY failed: %d", errno); goto out; + } /* If we can read the BMSR register, we assume that the card supports MII link detection */ bmsr = mdio_read (self, fd, &ifr, MII_BMSR); supports_mii = (bmsr != -1) ? TRUE : FALSE; + nm_log_dbg (LOGD_HW | LOGD_ETHER, "MII %s supported", + supports_mii ? "is" : "not"); out: close (fd); From d0f2a50680e0de563c0ceae215d3c6921097a85b Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 09:30:05 -0700 Subject: [PATCH 072/105] core: log kernel interface indexes --- src/nm-device-ethernet.c | 3 +++ src/nm-device-olpc-mesh.c | 3 +++ src/nm-device-wifi.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index c64ebb8ed6..69d0539dc5 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -311,6 +311,9 @@ constructor (GType type, self = NM_DEVICE (object); priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_ETHER, "(%s): kernel interface #%d", + nm_device_get_iface (NM_DEVICE (self)), priv->ifindex); + caps = nm_device_get_capabilities (self); if (caps & NM_DEVICE_CAP_CARRIER_DETECT) { GError *error = NULL; diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 41fc83acd7..2093a8e887 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -262,6 +262,9 @@ constructor (GType type, self = NM_DEVICE_OLPC_MESH (object); priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d", + nm_device_get_iface (NM_DEVICE (self)), priv->ifindex); + iface = nm_device_get_iface (NM_DEVICE (self)); fd = socket (PF_INET, SOCK_DGRAM, 0); if (fd < 0) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 6062c3c72e..3e7a820476 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -578,6 +578,9 @@ constructor (GType type, self = NM_DEVICE_WIFI (object); priv = NM_DEVICE_WIFI_GET_PRIVATE (self); + nm_log_dbg (LOGD_HW | LOGD_WIFI, "(%s): kernel ifindex %d", + nm_device_get_iface (NM_DEVICE (self)), priv->ifindex); + memset (&range, 0, sizeof (struct iw_range)); success = wireless_get_range (NM_DEVICE_WIFI (object), &range, &response_len); if (!success) From 157e9f791dcd01a53188ccec2ab8d552b5a03686 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 09:30:18 -0700 Subject: [PATCH 073/105] core: log netlink link messages --- src/nm-netlink-monitor.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c index 36cd99e2d0..918d637d72 100644 --- a/src/nm-netlink-monitor.c +++ b/src/nm-netlink-monitor.c @@ -186,6 +186,7 @@ netlink_object_message_handler (struct nl_object *obj, void *arg) struct rtnl_link *filter; struct rtnl_link *link_obj; guint flags; + guint ifidx; filter = rtnl_link_alloc (); if (!filter) { @@ -206,19 +207,17 @@ netlink_object_message_handler (struct nl_object *obj, void *arg) link_obj = (struct rtnl_link *) obj; flags = rtnl_link_get_flags (link_obj); + ifidx = rtnl_link_get_ifindex (link_obj); + + nm_log_dbg (LOGD_HW, "netlink link message: iface idx %d flags 0x%X", ifidx, flags); /* IFF_LOWER_UP is the indicator of carrier status since kernel commit * b00055aacdb172c05067612278ba27265fcd05ce in 2.6.17. */ - if (flags & IFF_LOWER_UP) { - g_signal_emit (G_OBJECT (monitor), - signals[CARRIER_ON], - 0, rtnl_link_get_ifindex (link_obj)); - } else { - g_signal_emit (G_OBJECT (monitor), - signals[CARRIER_OFF], - 0, rtnl_link_get_ifindex (link_obj)); - } + if (flags & IFF_LOWER_UP) + g_signal_emit (G_OBJECT (monitor), signals[CARRIER_ON], 0, ifidx); + else + g_signal_emit (G_OBJECT (monitor), signals[CARRIER_OFF], 0, ifidx); out: rtnl_link_put (filter); From b932dea21b32db2f5c415e759eb3355beb622c54 Mon Sep 17 00:00:00 2001 From: Krishna Babu K Date: Thu, 8 Apr 2010 10:52:52 -0700 Subject: [PATCH 074/105] po: update Telugu translation (bgo #615042) --- po/te.po | 949 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 896 insertions(+), 53 deletions(-) diff --git a/po/te.po b/po/te.po index 7b3ace2288..811c8ede72 100644 --- a/po/te.po +++ b/po/te.po @@ -1,4 +1,4 @@ -# translation of NetworkManager.master.te.po to Telugu +# translation of te.po to Telugu # Telugu translation of NetworkManager. # Copyright (C) 2009 NetworkManager's COPYRIGHT HOLDER # This file is distributed under the same license as the NetworkManager package. @@ -6,10 +6,10 @@ # Krishna Babu K , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: NetworkManager.master.te\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-09-29 03:25+0000\n" -"PO-Revision-Date: 2010-01-29 15:20+0530\n" +"Project-Id-Version: te\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-03-29 15:19+0530\n" +"PO-Revision-Date: 2010-04-07 14:59+0530\n" "Last-Translator: Krishna Babu K \n" "Language-Team: Telugu \n" "MIME-Version: 1.0\n" @@ -18,6 +18,851 @@ msgstr "" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n\n" "\n" +"\n" + +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "అనుసంధానములు" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "రకము" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "నామము" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "సిస్టమ్ అనుసంధానములు:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "వినియోగదారి అనుసంధానములు:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "దోషము: %s ఆర్గుమెంట్ తప్పిపోయినది." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "దోషము: %s - అటువంటి అనుసంధానము లేదు." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "సిస్టమ్-వ్యాప్త అనుసంధానములు" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "వినియోగదారి అనుసంధానములు" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "తెలియని పారామితి: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "దోషము: ఏ చెల్లునటువంటి పారామితి తెలుపబడలేదు." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "అవును" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "కాదు" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "క్రియాశీల అనుసంధానములు" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "అప్రమేయ" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "సేవ" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "పరికరములు" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "పరికరము '%s' పైన యెటువంటి క్రియాశీల అనుసంధానము లేదు" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "ఎటువంటి క్రియాశీల అనుసంధానము లేదా పరికరము లేదు" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "క్రియాశీలపరచుచున్నది" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "క్రియాశీలపరచబడింది" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "తెలియని" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN అనుసంధానమౌచున్నది (సిద్దపరచు)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN అనుసంధానమౌచున్నది (ధృవీకరణము అవసరము)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN అనుసంధానమౌచున్నది" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN అనుసంధానమౌచున్నది (IP ఆకృతీకరణను పొందుచున్నది)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN అనుసంధానమైంది" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN అనుసంధానము విఫలమైంది" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN అననుసంధానమైంది" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "తెలియని కారణము" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "ఏదీకాదు" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "వినియోగదారి అననుసంధానింప బడినారు" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "ఆధార నెట్వర్కు అనుసంధానము ఆటంకపరచబడింది" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN సేవ అనుకోకుండా ఆపివేయబడింది" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN సేవ చెల్లని ఆకృతీకరణను తిప్పియిచ్చినది" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "అనుసంధానపు ప్రయత్నం సమయం మించిపోయినది" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN సేవ సమయం లోపల ప్రారంభించబడలేదు" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN సేవ ప్రారంభమగుటకు విఫలమైంది" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "ఏ విలువైన VPN రహస్యాలు లేవు" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "చెల్లని VPN రహస్యాలు" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "అనుసంధానము తీసివేయబడింది" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "స్థితి: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "అనుసంధానము క్రియాశీలపరచబడింది\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "స్థితి: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "దోషము: కాలపరిమితి %d సె మించినది." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "దోషము: అనుసంధానము క్రియాశీలపరచుట విఫలమైంది: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "దోషము: '%s' కొరకు క్రియాశీల అనుసంధానమును పొందుటలో విఫలమైంది." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "క్రియాశీల అనుసంధానము స్థితి: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "క్రియాశీల అనుసంధానము పాత్: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "దోషము: తెలియని దోషము: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "దోషము: కాలముగింపు విలువ '%s' చెల్లనిది." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "దోషము: id లేదా uuid తెలుపవలసి వుంది." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "దోషము: ఎటువంటి సూటయ్యే పరికరము కనబడలేదు: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "దోషము: ఏ సూటగు పరికరము కనబడలేదు." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "హెచ్చరిక: అనుసంధానము క్రియాశీలంగా లేదు\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "దోషము: 'con' ఆదేశము '%s' చెల్లునది కాదు." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "దోషము: D-Busకు అనుసంధానము కాలేకపోయినది." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "దోషము: సిస్టమ్ అమరికలను పొందలేక పోయింది." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "దోషము: వినియోగదారి అమరికలను పొందలేక పోయింది." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "దోషము: అనుసంధానములను పొందలేదు: అమరికల సేవలు నడుచుటలేదు." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "నిర్వహించని" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "అందుబాటులోలేని" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "అననుసంధానమైన" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "అనుసంధానమౌచున్నది (సిద్దపడుతోంది)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "అనుసంధానమౌచున్నది (ఆకృతీకరించబడుతోంది)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "అనుసంధానమౌచున్నది (ధృవీకరణము అవసరము)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "అనుసంధానమౌచున్నది (IP ఆకృతీకరణను పొందుచున్నది)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "అనుసంధానమైంది" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "అనుసంధానము విఫలమైంది" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "తెలియని" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(ఏదీకాదు)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 చిరునామా 0x%X మార్చుటలో దోషము" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, పౌనఃపున్యం(ఫ్రీక్వెన్సీ) %d MHz, రేటు %d Mb/s, బలం(స్ట్రెన్త్) %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", ఎన్క్రిప్టెడ్: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr "ఎంటర్‌ప్రైజ్" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "పరికరము" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "డ్రైవర్" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(తెలియని)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "స్థితి" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW చిరునామా" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" సామర్ధ్యములు:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "కారియర్ గుర్తించబడింది" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "వేగము" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" వైర్‌లెస్ లక్షణములు\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP ఎన్క్రిప్షన్" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA ఎన్క్రిప్షన్" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 ఎన్క్రిప్షన్" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP సైఫర్" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP సైఫర్" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" వైర్‌లెస్ యాక్సిస్ పాయింట్స్ %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = current AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" వైర్డు లక్షణములు\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "కారియర్" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "ఆన్" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "ఆఫ్" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPv4 అమరికలు:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "చిరునామా" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "ప్రిఫిక్స్" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "గేట్‌వే" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "పరికరముల యొక్క స్థితి" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "దోషము: '%s' ఆర్గుమెంట్ తప్పిపోయినది." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "దోషము: పరికరము '%s' కనబడలేదు." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "సఫలమైంది: పరికరము '%s' సఫలవంతంగా అననుసంధానించబడింది." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "దోషము: పరికరము '%s' (%s) అననుసంధానము విఫలమైంది: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "పరికరము స్థితి: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "దోషము: iface తెలుపవలసి వుంది." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "WiFi స్కాన్ జాబితా" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "దోషము: పరికరము '%s' అనునది WiFi పరికరము కాదు." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "పరికరము:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "దోషము: hwaddr తెలుపవలసి వుంది." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "దోషము: హార్డువేర్‌చిరునామా '%s'తో యాక్సెస్ పాయింట్ కనబడలేదు." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP పారామితులు" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "పౌనఃపున్యము:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "రీతి:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "అవస్థాపన(ఇన్ఫ్రాస్ట్రక్చర్)" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "గరిష్ట బిట్‌రేట్:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "బలం:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "ఫ్లాగ్స్:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "గోప్యత" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA ఫ్లాగ్స్:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN ఫ్లాగ్స్:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "దోషము: 'dev wifi' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "దోషము: 'dev' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "స్థబ్దుగా(asleep)" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "అనుసంధానమౌచున్నది" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "చేతనమైంది" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "అచేతనమైంది" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "నెట్వర్కునిర్వాహిక స్థితి" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "నెని నడుచుచున్నది:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "నడుచుచున్నది" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "నడుచుటలేదు" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "నెని స్థితి:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "నెని వైర్‌లెస్ హార్డువేరు:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "నెని వైర్‌లెస్:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "నెని WWAN హార్డువేర్:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "దోషము: చెల్లని 'wifi' పారామితి: '%s'." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "దోషము: చెల్లని 'wwan' పారామితి: '%s'." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "దోషము: 'nm' ఆదేశము '%s' చెల్లనిది." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "ఆబ్జక్టు '%s' తెలియనిది, 'nmcli help' ప్రయత్నించండి." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli సాధనము, వర్షన్ %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "ఐచ్చికము '%s' తెలియనిది, 'nmcli -help' ప్రయత్నించండి." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "సిగ్నల్ %d వచ్చింది, మూసివేయుచున్నది..." + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "దోషము: నెట్వర్కునిర్వాహికకు అనుసంధానము కాలేకపోయింది." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "సఫలంమైంది" #: ../libnm-util/crypto.c:120 #, c-format @@ -106,7 +951,7 @@ msgstr "IV నాన్-హెక్సాడెసిమల్ సంఖ్య #: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 #: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 -#: ../libnm-util/crypto_nss.c:335 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "వ్యక్తిగత కీ సైఫర్ '%s' అనునది తెలియనిది." @@ -165,43 +1010,38 @@ msgstr "వివరణ కొరకు IV అమర్చుటలో విఫ msgid "Failed to decrypt the private key: %s / %s." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: %s / %s." -#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:266 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: unexpected padding length." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: అనుకోని పాడింగ్ పొడవు." -#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:277 +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:355 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 #, c-format msgid "Could not allocate memory for encrypting." msgstr "ఎన్క్రిప్టింగ్ కొరకు మెమొరీ కేటాయించలేక పోయింది." #: ../libnm-util/crypto_gnutls.c:294 #, c-format -#| msgid "Failed to initialize the decryption cipher context: %s / %s." msgid "Failed to initialize the encryption cipher context: %s / %s." msgstr "ఎన్క్రిప్షన్ సైఫర్ కాంటెస్టును సిద్దము చేయుటలో విఫలమైంది: %s / %s." #: ../libnm-util/crypto_gnutls.c:303 #, c-format -#| msgid "Failed to set symmetric key for decryption: %s / %s." msgid "Failed to set symmetric key for encryption: %s / %s." msgstr "ఎన్క్రిప్షన్ కొరకు సిమెట్రిక్ కీను అమర్చుటలో విఫలమైంది: %s / %s." #: ../libnm-util/crypto_gnutls.c:313 #, c-format -#| msgid "Failed to set IV for decryption: %s / %s." msgid "Failed to set IV for encryption: %s / %s." msgstr "ఎన్క్రిప్షన్ కొరకు IV అమర్చుటలో విఫలమైంది: %s / %s." #: ../libnm-util/crypto_gnutls.c:322 #, c-format -#| msgid "Failed to decrypt the private key: %s / %s." msgid "Failed to encrypt the data: %s / %s." msgstr "డాటాను ఎన్క్రిప్టు చేయుటలో విఫలమైంది: %s / %s." @@ -230,7 +1070,7 @@ msgstr "PKCS#12 ఫైలును డీకోడ్ పరచలేక పో msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ఫైలును నిర్ధారించలేక పోయింది: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "క్రిప్టో యింజన్ సిద్దము చేయుటలో విఫలమైంది: %d." @@ -272,7 +1112,6 @@ msgstr "వ్యక్తిగత కీను డిక్రిప్టు #: ../libnm-util/crypto_nss.c:245 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: decrypted data too large." msgstr "వ్యక్తిగత కీను డిక్రిప్టు చేయుటలో విఫలమైంది: డిక్రిప్టు చేసిన డాటా మరీ పెద్దది." @@ -281,100 +1120,91 @@ msgstr "వ్యక్తిగత కీను డిక్రిప్టు msgid "Failed to finalize decryption of the private key: %d." msgstr "వ్యక్తిగత కీ యొక్క డిక్రిప్షన్ ఖరారు చేయుటలో విఫలమైంది: %d." -#: ../libnm-util/crypto_nss.c:363 +#: ../libnm-util/crypto_nss.c:364 #, c-format -#| msgid "Failed to initialize the decryption cipher slot." msgid "Failed to initialize the encryption cipher slot." msgstr "ఎన్క్రిప్షన్ సైఫర్ స్లాట్‌ను సిద్దముచేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:371 +#: ../libnm-util/crypto_nss.c:372 #, c-format -#| msgid "Failed to set symmetric key for decryption." msgid "Failed to set symmetric key for encryption." msgstr "ఎన్క్రిప్షన్ కొరకు సిమ్మెట్రిక్ కీను అమర్చుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:379 +#: ../libnm-util/crypto_nss.c:380 #, c-format -#| msgid "Failed to set IV for decryption." msgid "Failed to set IV for encryption." msgstr "ఎన్క్రిప్షన్ కొరకు IV అమర్చుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:387 +#: ../libnm-util/crypto_nss.c:388 #, c-format -#| msgid "Failed to initialize the decryption context." msgid "Failed to initialize the encryption context." msgstr "ఎన్క్రిప్షన్ సందర్భమును సిద్దముచేయుటలో విఫలమైంది." -#: ../libnm-util/crypto_nss.c:395 +#: ../libnm-util/crypto_nss.c:396 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to encrypt: %d." msgstr "ఎన్క్రిప్టు చేయుటకు విఫలమైంది: %d." -#: ../libnm-util/crypto_nss.c:403 +#: ../libnm-util/crypto_nss.c:404 #, c-format msgid "Unexpected amount of data after encrypting." msgstr "ఎన్క్రిప్టు చేసిన తర్వాత అనుకోని డాటా మొత్తము." -#: ../libnm-util/crypto_nss.c:446 +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "దృవీకరణపత్రమును డీకోడ్ చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:481 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "సంకేతపదమును UCS2కు మార్చలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:509 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 డీకోడర్‌ను సిద్దము చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:518 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ఫైలు డీకోడ్ చేయలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:527 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ఫైలు నిర్దారించలేక పోయింది: %d" -#: ../libnm-util/crypto_nss.c:556 -#| msgid "Could not decode private key." +#: ../libnm-util/crypto_nss.c:557 msgid "Could not generate random data." msgstr "యాదృశ్చిక డాటాను జనియింపచేయలేక పోయింది." -#: ../libnm-util/nm-utils.c:1522 +#: ../libnm-util/nm-utils.c:1802 #, c-format -#| msgid "Not enough memory to decrypt private key." msgid "Not enough memory to make encryption key." msgstr "ఎన్క్రిప్షన్ కీను తయారుచేయుటకు సరిపోవు మెమొరీ లేదు." -#: ../libnm-util/nm-utils.c:1633 -#| msgid "Not enough memory to store PEM file data." +#: ../libnm-util/nm-utils.c:1912 msgid "Could not allocate memory for PEM file creation." msgstr "మెమొరీను PEM ఫైలు సృష్టీకరణ కొరకు కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1645 +#: ../libnm-util/nm-utils.c:1924 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "IVను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1657 +#: ../libnm-util/nm-utils.c:1936 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "ఎన్క్రిప్టు చేసిన కీను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1676 +#: ../libnm-util/nm-utils.c:1955 #, c-format -#| msgid "Not enough memory to store PEM file data." msgid "Could not allocate memory for PEM file data." msgstr "PEM ఫైలు డాటా కొరకు మెమొరీను కేటాయించలేక పోయింది." #: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 -#: ../src/nm-netlink-monitor.c:569 +#: ../src/nm-netlink-monitor.c:582 #: ../src/ip6-manager/nm-netlink-listener.c:352 #, c-format msgid "error processing netlink message: %s" @@ -405,21 +1235,21 @@ msgstr "లింకు స్థితిని పర్యవేక్షి msgid "error occurred while waiting for data on socket" msgstr "సాకెట్ నందు డాటా కొరకు వేచివుండునప్పుడు దోషము సంభవించినది" -#: ../src/nm-netlink-monitor.c:558 +#: ../src/nm-netlink-monitor.c:558 ../src/nm-netlink-monitor.c:571 #, c-format msgid "error updating link cache: %s" msgstr "లింకు క్యాచీని నవీకరించుటలో దోషము: %s" -#: ../src/NetworkManager.c:330 +#: ../src/main.c:494 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "చెల్లని ఐచ్చికము. చెల్లునటువంటి ఐచ్చికముల జాబితా కొరకు --help వుపయోగించండి.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 msgid "# Created by NetworkManager\n" msgstr "# నెట్వర్కునిర్వాహిక ద్వారా సృష్టించబడింది\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 #, c-format msgid "" "# Merged from %s\n" @@ -428,21 +1258,35 @@ msgstr "" "# %sనుండి కలుపబడింది\n" "\n" +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ఎటువంటి వుపయోగకర DHCP క్లైంట్ కనుగొనబడలేదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' కనుగొనబడ గలదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' కనుగొనబడ గలదు." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "మద్దతీయని DHCP క్లైంట్ '%s'" + #: ../src/ip6-manager/nm-netlink-listener.c:200 #, c-format -#| msgid "unable to allocate netlink handle for monitoring link status: %s" msgid "unable to allocate netlink handle: %s" msgstr "నెట్‌లింక్ సంభాలికను కేటాయించలేక పోయింది: %s" #: ../src/ip6-manager/nm-netlink-listener.c:210 #, c-format -#| msgid "unable to connect to netlink for monitoring link status: %s" msgid "unable to connect to netlink: %s" msgstr "నెట్‌లింక్‌కు అనుసంధానము కాలేకపోయింది: %s" #: ../src/ip6-manager/nm-netlink-listener.c:307 #, c-format -#| msgid "unable to join netlink group for monitoring link status: %s" msgid "unable to join netlink group: %s" msgstr "నెట్‌లింకు సమూహాన్ని చేర్చుకొనలేక పోయింది: %s" @@ -454,12 +1298,12 @@ msgstr "గమనిక: libc రిజాల్వర్ 3 నామపు స msgid "The nameservers listed below may not be recognized." msgstr "క్రిందన జాబితాచేసివున్న నామపుసేవికలు గుర్తించబడక పోవచ్చును." -#: ../src/system-settings/nm-default-wired-connection.c:194 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "స్వయంచాలక %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2406 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 msgid "System" msgstr "సిస్టమ్" @@ -484,7 +1328,6 @@ msgid "System policy prevents modification of system settings" msgstr "సిస్టమ్ అమరికలు సవరించుటకు సిస్టమ్ పాలసి నిరోధిస్తుంది" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 -#| msgid "System policy prevents modification of system settings" msgid "System policy prevents modification of the persistent system hostname" msgstr "నిరంతర సిస్టమ్ హోస్టునామమును సవరించుటను సిస్టమ్ విధానము నిరోధించుచున్నది" From 0d8174dfa69f295b1f930fd4e9f8ce4791a0b335 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 13:29:07 -0700 Subject: [PATCH 075/105] logging: fix build on 32-bit platforms --- src/logging/nm-logging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index 3e3efa4760..b1d1b058b8 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -199,14 +199,14 @@ void _nm_log (const char *loc, if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) { g_get_current_time (&tv); - syslog (LOG_DEBUG, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + syslog (LOG_DEBUG, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); } else if ((log_level & LOGL_INFO) && (level == LOGL_INFO)) syslog (LOG_INFO, " %s\n", msg); else if ((log_level & LOGL_WARN) && (level == LOGL_WARN)) syslog (LOG_WARNING, " %s\n", msg); else if ((log_level & LOGL_ERR) && (level == LOGL_ERR)) { g_get_current_time (&tv); - syslog (LOG_ERR, " [%zu.%zu] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + syslog (LOG_ERR, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); } g_free (msg); } From 8247ecc524267a06bf5ec3e3d3b7f4237e035416 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 13:56:37 -0700 Subject: [PATCH 076/105] doc: fix libnm-glib doc generation --- docs/libnm-glib/Makefile.am | 17 ++++++++------ docs/libnm-glib/libnm-glib-docs.sgml | 35 ++++++++++++++++------------ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/docs/libnm-glib/Makefile.am b/docs/libnm-glib/Makefile.am index 297722a46e..96ff66eee3 100644 --- a/docs/libnm-glib/Makefile.am +++ b/docs/libnm-glib/Makefile.am @@ -34,23 +34,26 @@ IGNORE_HFILES= \ nm-device-private.h \ nm-object-cache.h \ nm-object-private.h \ + nm-remote-connection-private.h \ nm-types-private.h \ nm-access-point-bindings.h \ + nm-active-connection-bindings.h \ nm-client-bindings.h \ nm-device-bindings.h \ + nm-device-bt-bindings.h \ nm-device-ethernet-bindings.h \ nm-device-wifi-bindings.h \ - nm-exported-connection-glue.h \ + nm-dhcp4-config-bindings.h \ + nm-dhcp6-config-bindings.h \ nm-exported-connection-bindings.h \ - nm-settings-glue.h \ + nm-exported-connection-glue.h \ + nm-ip4-config-bindings.h \ + nm-ip6-config-bindings.h \ nm-settings-bindings.h \ + nm-settings-glue.h \ nm-settings-system-bindings.h \ nm-vpn-connection-bindings.h \ - nm-vpn-plugin-glue.h \ - nm-active-connection-bindings.h \ - nm-ip4-config-bindings.h \ - nm-dhcp4-config-bindings.h \ - nm-ip4-config-bindings.h + nm-vpn-plugin-glue.h # Images to copy into HTML directory. HTML_IMAGES = diff --git a/docs/libnm-glib/libnm-glib-docs.sgml b/docs/libnm-glib/libnm-glib-docs.sgml index 8fe5a1d43a..0ea21102ee 100644 --- a/docs/libnm-glib/libnm-glib-docs.sgml +++ b/docs/libnm-glib/libnm-glib-docs.sgml @@ -5,35 +5,40 @@ libnm-glib Reference Manual - for libnm-glib [VERSION] + for libnm-glib 0.8 The latest version of this documentation can be found on-line at - http://[SERVER]/libnm-glib/. + http://projects.gnome.org/NetworkManager/developers/libnm-glib/08/. - [Insert title here] + libnm-glib Objects + - + + + + + + + - + + + + + + + + + - - - - - - - - - - From f5adc0f62b92af9acda29bc197e863c8d9a50772 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 14:00:08 -0700 Subject: [PATCH 077/105] doc: rearrange libnm-glib doc sections --- docs/libnm-glib/libnm-glib-docs.sgml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/libnm-glib/libnm-glib-docs.sgml b/docs/libnm-glib/libnm-glib-docs.sgml index 0ea21102ee..b4e5dac25a 100644 --- a/docs/libnm-glib/libnm-glib-docs.sgml +++ b/docs/libnm-glib/libnm-glib-docs.sgml @@ -13,25 +13,25 @@ libnm-glib Objects - - - - + + + + + + + + - - - - From dcda7e7ab2f345fd2b819268321b15dd0eaf8282 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 14:03:04 -0700 Subject: [PATCH 078/105] doc: update libnm-util doc locations --- docs/libnm-util/libnm-util-docs.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/libnm-util/libnm-util-docs.sgml b/docs/libnm-util/libnm-util-docs.sgml index 3758b6eb59..78b931d8a2 100644 --- a/docs/libnm-util/libnm-util-docs.sgml +++ b/docs/libnm-util/libnm-util-docs.sgml @@ -8,9 +8,9 @@ libnm-util Reference Manual - for libnm-util [VERSION] + for libnm-util 0.8 The latest version of this documentation can be found on-line at - http://[SERVER]/libnm-util/. + http://projects.gnome.org/NetworkManager/developers/libnm-util/08/. From 78f7ef11151f548fa39a3b4ed0732a335c777094 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 14:49:56 -0700 Subject: [PATCH 079/105] logging: use INFO level for debug messages By default most distros won't log debug messages to syslog; but we want them logged when the user explicitly requests them via the logging API and config options in NM. Half the point of doing more logging was to make it easier for users to get logs out of NM, and having to edit syslog configuration makes it all pointless. --- src/logging/nm-logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index b1d1b058b8..acfca1b46f 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -199,7 +199,7 @@ void _nm_log (const char *loc, if ((log_level & LOGL_DEBUG) && (level == LOGL_DEBUG)) { g_get_current_time (&tv); - syslog (LOG_DEBUG, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); + syslog (LOG_INFO, " [%ld.%ld] [%s] %s(): %s\n", tv.tv_sec, tv.tv_usec, loc, func, msg); } else if ((log_level & LOGL_INFO) && (level == LOGL_INFO)) syslog (LOG_INFO, " %s\n", msg); else if ((log_level & LOGL_WARN) && (level == LOGL_WARN)) From ea05e9001627452a6bef5a168d1897360af48ed9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 15:00:32 -0700 Subject: [PATCH 080/105] ethernet: fix debug log message --- src/nm-device-ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 69d0539dc5..f4581e9ac6 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -311,7 +311,7 @@ constructor (GType type, self = NM_DEVICE (object); priv = NM_DEVICE_ETHERNET_GET_PRIVATE (self); - nm_log_dbg (LOGD_HW | LOGD_ETHER, "(%s): kernel interface #%d", + nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d", nm_device_get_iface (NM_DEVICE (self)), priv->ifindex); caps = nm_device_get_capabilities (self); From 3592e59cabbb8363b699cf4886a71502b7548d74 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 15:51:32 -0700 Subject: [PATCH 081/105] wifi: fix log message --- src/nm-device-wifi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 3e7a820476..cccaf1194e 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -3517,7 +3517,8 @@ real_set_enabled (NMDeviceInterface *device, gboolean enabled) state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); if (state < NM_DEVICE_STATE_UNAVAILABLE) { - nm_log_dbg (LOGD_WIFI, "(%s): enable blocked by UNMANAGED state", + nm_log_dbg (LOGD_WIFI, "(%s): %s blocked by UNMANAGED state", + enabled ? "enable" : "disable", nm_device_get_iface (NM_DEVICE (device))); return; } From c57c40a621003265a46ed07a558c27baf6e258a1 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 15:51:54 -0700 Subject: [PATCH 082/105] core: fix device log message in UNAVAILABLE state --- src/nm-device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nm-device.c b/src/nm-device.c index e10c9049ed..280d4e4105 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -3390,9 +3390,12 @@ nm_device_state_changed (NMDevice *device, * reasons. */ if (nm_device_is_available (device)) { - nm_log_dbg (LOGD_WIFI, "(%s): device is available, will transition to DISCONNECTED", + nm_log_dbg (LOGD_DEVICE, "(%s): device is available, will transition to DISCONNECTED", nm_device_get_iface (device)); priv->unavailable_to_disconnected_id = g_idle_add (unavailable_to_disconnected, device); + } else { + nm_log_dbg (LOGD_DEVICE, "(%s): device not yet available for transition to DISCONNECTED", + nm_device_get_iface (device)); } break; case NM_DEVICE_STATE_ACTIVATED: From 38ef723df33d2776345116b6cb78a29493dafbd9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 8 Apr 2010 18:23:43 -0700 Subject: [PATCH 083/105] wifi: fix disabled wifi devices on resume (rh #578141) RFKILL_TYPE_WLAN is 0, and we while we had allocated the structure for WIMAX rfkill in the manager's priv->radio_states, we hadn't filled it in. That meant that priv->radio_states[RFKILL_TYPE_WIMAX].rtype was 0, and thus various operations thought that wifi devices were wimax devices, and since WiMAX rfkill is never updated because it's not yet used, wifi would never be enabled after resume. --- src/nm-manager.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index 3189e3f76f..a24606ad99 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1407,13 +1407,19 @@ manager_rfkill_update_one_type (NMManager *self, break; } + if (rstate->desc) { + nm_log_dbg (LOGD_RFKILL, "%s hw-enabled %d enabled %d", + rstate->desc, new_he, new_e); + } + if (new_he != rstate->hw_enabled) { nm_log_info (LOGD_RFKILL, "%s now %s by radio killswitch", rstate->desc, (new_e && new_he) ? "enabled" : "disabled"); rstate->hw_enabled = new_he; - g_object_notify (G_OBJECT (self), rstate->hw_prop); + if (rstate->hw_prop) + g_object_notify (G_OBJECT (self), rstate->hw_prop); } manager_set_radio_enabled (self, rstate, new_e); } @@ -2715,6 +2721,12 @@ impl_manager_sleep (NMManager *self, gboolean sleep, GError **error) gboolean enabled = (rstate->hw_enabled && rstate->enabled); RfKillType devtype = RFKILL_TYPE_UNKNOWN; + if (rstate->desc) { + nm_log_dbg (LOGD_RFKILL, "%s %s devices (hw_enabled %d, enabled %d)", + enabled ? "enabling" : "disabling", + rstate->desc, rstate->hw_enabled, rstate->enabled); + } + g_object_get (G_OBJECT (device), NM_DEVICE_INTERFACE_RFKILL_TYPE, &devtype, NULL); if (devtype == rstate->rtype) nm_device_interface_set_enabled (NM_DEVICE_INTERFACE (device), enabled); @@ -2899,6 +2911,10 @@ nm_manager_start (NMManager *self) manager_set_radio_enabled (self, rstate, rstate->enabled && enabled); } + /* Log overall networking status - asleep/running */ + nm_log_info (LOGD_CORE, "Networking is %s by state file", + priv->sleeping ? "disabled" : "enabled"); + system_unmanaged_devices_changed_cb (priv->sys_settings, NULL, self); system_hostname_changed_cb (priv->sys_settings, NULL, self); system_query_connections (self); @@ -3154,6 +3170,14 @@ nm_manager_init (NMManager *manager) priv->radio_states[RFKILL_TYPE_WWAN].other_enabled_func = nm_manager_get_modem_enabled_state; priv->radio_states[RFKILL_TYPE_WWAN].rtype = RFKILL_TYPE_WWAN; + priv->radio_states[RFKILL_TYPE_WIMAX].enabled = TRUE; + priv->radio_states[RFKILL_TYPE_WIMAX].key = "WiMAXEnabled"; + priv->radio_states[RFKILL_TYPE_WIMAX].prop = NULL; + priv->radio_states[RFKILL_TYPE_WIMAX].hw_prop = NULL; + priv->radio_states[RFKILL_TYPE_WIMAX].desc = "WiMAX"; + priv->radio_states[RFKILL_TYPE_WIMAX].other_enabled_func = NULL; + priv->radio_states[RFKILL_TYPE_WIMAX].rtype = RFKILL_TYPE_WIMAX; + for (i = 0; i < RFKILL_TYPE_MAX; i++) priv->radio_states[i].hw_enabled = TRUE; From 618c5f1b086c3b4f18a13dd2c0dd1e2604da1c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Gonz=C3=A1lez?= Date: Sun, 11 Apr 2010 21:24:59 -0700 Subject: [PATCH 084/105] po: update Spanish translation (bgo #615374) --- po/es.po | 66 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/po/es.po b/po/es.po index 9e0a29ca44..6919c06759 100644 --- a/po/es.po +++ b/po/es.po @@ -11,8 +11,8 @@ msgstr "" "Project-Id-Version: NetworkManager.HEAD\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=NetworkManager&component=general\n" -"POT-Creation-Date: 2010-02-26 03:24+0000\n" -"PO-Revision-Date: 2010-03-28 18:46+0200\n" +"POT-Creation-Date: 2010-04-09 03:24+0000\n" +"PO-Revision-Date: 2010-04-10 19:52+0200\n" "Last-Translator: Jorge González \n" "Language-Team: Español \n" "MIME-Version: 1.0\n" @@ -1186,85 +1186,91 @@ msgstr "No se pudo verificar el archivo PKCS#12: %d" msgid "Could not generate random data." msgstr "No se pudo generar datos aleatorios." -#: ../libnm-util/nm-utils.c:1802 +#: ../libnm-util/nm-utils.c:1818 #, c-format msgid "Not enough memory to make encryption key." msgstr "No hay memoria suficiente para crear la clave privada de cifrado." -#: ../libnm-util/nm-utils.c:1912 +#: ../libnm-util/nm-utils.c:1928 msgid "Could not allocate memory for PEM file creation." msgstr "No se pudo reservar memoria para crear el archivo PEM." -#: ../libnm-util/nm-utils.c:1924 +#: ../libnm-util/nm-utils.c:1940 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "No se pudo asignar memoria para escribir IV en el archivo PEM." -#: ../libnm-util/nm-utils.c:1936 +#: ../libnm-util/nm-utils.c:1952 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "" "No se pudo asignar memoria para escribir la clave cifrada en el archivo PEM." -#: ../libnm-util/nm-utils.c:1955 +#: ../libnm-util/nm-utils.c:1971 #, c-format msgid "Could not allocate memory for PEM file data." msgstr "No se pudo reservar memoria para el archivo de datos PEM." -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 -#: ../src/nm-netlink-monitor.c:582 -#: ../src/ip6-manager/nm-netlink-listener.c:352 +#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:463 +#: ../src/nm-netlink-monitor.c:581 +#: ../src/ip6-manager/nm-netlink-listener.c:351 #, c-format msgid "error processing netlink message: %s" msgstr "error al procesar el mensaje de netlink: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:259 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "no se puede asignar el manejador netlink para monitorizar el estado del " "enlace: %s" -#: ../src/nm-netlink-monitor.c:270 +#: ../src/nm-netlink-monitor.c:269 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "" "no se puede conectar con netlink para monitorizar el estado del enlace: %s" -#: ../src/nm-netlink-monitor.c:278 +#: ../src/nm-netlink-monitor.c:277 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "" "no pudo unirse al grupo netlink para monitorizar el estado del enlace: %s" -#: ../src/nm-netlink-monitor.c:286 +#: ../src/nm-netlink-monitor.c:285 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "no se puede asignar el enlace a la caché de netlink para monitorizar el " "estado del enlace: %s" -#: ../src/nm-netlink-monitor.c:494 -#: ../src/ip6-manager/nm-netlink-listener.c:382 +#: ../src/nm-netlink-monitor.c:493 +#: ../src/ip6-manager/nm-netlink-listener.c:381 msgid "error occurred while waiting for data on socket" msgstr "ha ocurrido un error mientras esperaban datos en un socket" -#: ../src/nm-netlink-monitor.c:558 ../src/nm-netlink-monitor.c:571 +#: ../src/nm-netlink-monitor.c:557 ../src/nm-netlink-monitor.c:570 #, c-format msgid "error updating link cache: %s" msgstr "error al actualizar el enlace caché: %s" -#: ../src/main.c:494 +#: ../src/main.c:498 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "" "Opción no válida. Use --help para ver una lista de las opciones válidas.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 +#: ../src/main.c:558 +#, c-format +#| msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Use --help para ver una lista de las opciones válidas.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Creado por NetworkManager\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -1290,28 +1296,38 @@ msgstr "no se pudo encontrar «dhcpd»." msgid "unsupported DHCP client '%s'" msgstr "no se soporta el cliente de DHCP «%s»" -#: ../src/ip6-manager/nm-netlink-listener.c:200 +#: ../src/ip6-manager/nm-netlink-listener.c:199 #, c-format msgid "unable to allocate netlink handle: %s" msgstr "no se puede asignar el manejador netlink: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:210 +#: ../src/ip6-manager/nm-netlink-listener.c:209 #, c-format msgid "unable to connect to netlink: %s" msgstr "no se puede conectar con netlink: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:307 +#: ../src/ip6-manager/nm-netlink-listener.c:306 #, c-format msgid "unable to join netlink group: %s" msgstr "no pudo unirse al grupo netlink: %s" -#: ../src/named-manager/nm-named-manager.c:315 +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Nivel de registro «%s» desconocido" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Dominio de registro «%s» desconocido" + +#: ../src/named-manager/nm-named-manager.c:314 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "" "NOTA: el resolutor de nombres de libc puede que no soporte más de 3 " "servidores de nombres." -#: ../src/named-manager/nm-named-manager.c:317 +#: ../src/named-manager/nm-named-manager.c:316 msgid "The nameservers listed below may not be recognized." msgstr "Puede que los servidores de nombres listados abajo no se reconozcan." From ab529302a7bb1dbf819a64c4a7a80fc0706c02c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 12 Apr 2010 17:15:28 +0200 Subject: [PATCH 085/105] ifcfg-rh: fix setting MTU to "automatic" for wired connections (rh #569319) ifcfg-rh plugin was not able to reset MTU to "automatic" if it had been set to a value, for wired connection. This fix removes "MTU" variable from the ifcfg-* file when mtu is 0. --- system-settings/plugins/ifcfg-rh/writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index 330bbf044e..74f3a59a56 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -807,6 +807,7 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) g_free (tmp); } + svSetValue (ifcfg, "MTU", NULL, FALSE); mtu = nm_setting_wired_get_mtu (s_wired); if (mtu) { tmp = g_strdup_printf ("%u", mtu); From 9b9331f53d562af20c73489635dbdd03d25f534d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 12 Apr 2010 17:48:37 +0200 Subject: [PATCH 086/105] logging: fix log level flag values (LOGL_*) 0x00000000 caused that ERR level (nm_log_err()) gets never logged. --- src/logging/nm-logging.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h index 4c381a24a3..2dc52d1e53 100644 --- a/src/logging/nm-logging.h +++ b/src/logging/nm-logging.h @@ -57,10 +57,10 @@ enum { /* Log levels */ enum { - LOGL_ERR = 0x00000000, - LOGL_WARN = 0x00000001, - LOGL_INFO = 0x00000002, - LOGL_DEBUG = 0x00000004 + LOGL_ERR = 0x00000001, + LOGL_WARN = 0x00000002, + LOGL_INFO = 0x00000004, + LOGL_DEBUG = 0x00000008 }; #define NM_LOGGING_ERROR (nm_logging_error_quark ()) From 9000c688393af8f797a1a788ac8b4fc1686bf130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 12 Apr 2010 17:55:44 +0200 Subject: [PATCH 087/105] logging: change default level to be true INFO level Using LOGL_INFO | LOGL_WARN | LOGL_ERR as default to log the same values as though "--log-level=INFO" were specified. --- src/logging/nm-logging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c index acfca1b46f..ac30eb42c6 100644 --- a/src/logging/nm-logging.c +++ b/src/logging/nm-logging.c @@ -37,7 +37,7 @@ #include "nm-logging.h" -static guint32 log_level = LOGL_INFO; +static guint32 log_level = LOGL_INFO | LOGL_WARN | LOGL_ERR; static guint32 log_domains = \ LOGD_HW | LOGD_RFKILL | LOGD_ETHER | LOGD_WIFI | LOGD_BT | LOGD_MB | \ LOGD_DHCP4 | LOGD_DHCP6 | LOGD_PPP | LOGD_IP4 | LOGD_IP6 | LOGD_AUTOIP4 | \ From dc7fe96e3f34bcf7ebd2f7c3cbbb1930bf099e83 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 12 Apr 2010 16:24:07 -0700 Subject: [PATCH 088/105] ifcfg-rh: fix IPv6-only configurations (rh #538499) --- system-settings/plugins/ifcfg-rh/reader.c | 58 ++-- .../tests/network-scripts/Makefile.am | 3 +- .../ifcfg-test-wired-ipv6-only | 14 + .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 287 +++++++++++++++++- system-settings/plugins/ifcfg-rh/writer.c | 29 +- 5 files changed, 364 insertions(+), 27 deletions(-) create mode 100644 system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index a445d5b177..32575f3953 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2009 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -1115,6 +1115,7 @@ static NMSetting * make_ip4_setting (shvarFile *ifcfg, const char *network_file, const char *iscsiadm_path, + gboolean valid_ip6_config, GError **error) { NMSettingIP4Config *s_ip4 = NULL; @@ -1192,14 +1193,17 @@ make_ip4_setting (shvarFile *ifcfg, g_set_error (error, ifcfg_plugin_error_quark (), 0, "Unknown BOOTPROTO '%s'", value); g_free (value); - goto error; + goto done; } g_free (value); } else { char *tmp_ip4, *tmp_prefix, *tmp_netmask; - /* If there is no BOOTPROTO, no IPADDR, no PREFIX, and no NETMASK, - * assume DHCP is to be used. Happens with minimal ifcfg files like: + /* If there is no BOOTPROTO, no IPADDR, no PREFIX, no NETMASK, but + * valid IPv6 configuration, assume that IPv4 is disabled. Otherwise, + * if there is no IPv6 configuration, assume DHCP is to be used. + * Happens with minimal ifcfg files like the following that anaconda + * sometimes used to write out: * * DEVICE=eth0 * HWADDR=11:22:33:44:55:66 @@ -1208,8 +1212,14 @@ make_ip4_setting (shvarFile *ifcfg, tmp_ip4 = svGetValue (ifcfg, "IPADDR", FALSE); tmp_prefix = svGetValue (ifcfg, "PREFIX", FALSE); tmp_netmask = svGetValue (ifcfg, "NETMASK", FALSE); - if (!tmp_ip4 && !tmp_prefix && !tmp_netmask) + if (!tmp_ip4 && !tmp_prefix && !tmp_netmask) { + if (valid_ip6_config) { + /* Nope, no IPv4 */ + goto done; + } + method = NM_SETTING_IP4_CONFIG_METHOD_AUTO; + } g_free (tmp_ip4); g_free (tmp_prefix); g_free (tmp_netmask); @@ -1229,7 +1239,7 @@ make_ip4_setting (shvarFile *ifcfg, for (i = 1; i < 256; i++) { addr = read_full_ip4_address (ifcfg, network_file, i, error); if (error && *error) - goto error; + goto done; if (!addr) break; @@ -1271,7 +1281,7 @@ make_ip4_setting (shvarFile *ifcfg, } if (!tmp_success) { g_free (tag); - goto error; + goto done; } g_clear_error (error); } @@ -1305,7 +1315,7 @@ make_ip4_setting (shvarFile *ifcfg, if (!route_path) { g_set_error (error, ifcfg_plugin_error_quark (), 0, "Could not get route file path for '%s'", ifcfg->fileName); - goto error; + goto done; } /* First test new/legacy syntax */ @@ -1319,7 +1329,7 @@ make_ip4_setting (shvarFile *ifcfg, route = read_one_ip4_route (route_ifcfg, network_file, i, error); if (error && *error) { svCloseFile (route_ifcfg); - goto error; + goto done; } if (!route) break; @@ -1334,7 +1344,7 @@ make_ip4_setting (shvarFile *ifcfg, read_route_file_legacy (route_path, s_ip4, error); g_free (route_path); if (error && *error) - goto error; + goto done; } /* Legacy value NM used for a while but is incorrect (rh #459370) */ @@ -1360,7 +1370,7 @@ make_ip4_setting (shvarFile *ifcfg, return NM_SETTING (s_ip4); -error: +done: g_object_unref (s_ip4); return NULL; } @@ -3058,6 +3068,7 @@ connection_from_file (const char *filename, NMSetting *s_ip4, *s_ip6; const char *ifcfg_name = NULL; gboolean nm_controlled = TRUE; + gboolean ip6_used = FALSE; g_return_val_if_fail (filename != NULL, NULL); g_return_val_if_fail (unmanaged != NULL, NULL); @@ -3161,22 +3172,27 @@ connection_from_file (const char *filename, if (!connection || *unmanaged) goto done; - s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, error); - if (*error) { - g_object_unref (connection); - connection = NULL; - goto done; - } else if (s_ip4) { - nm_connection_add_setting (connection, s_ip4); - } - s_ip6 = make_ip6_setting (parsed, network_file, iscsiadm_path, error); if (*error) { g_object_unref (connection); connection = NULL; goto done; - } else if (s_ip6) + } else if (s_ip6) { + const char *method; + nm_connection_add_setting (connection, s_ip6); + method = nm_setting_ip6_config_get_method (NM_SETTING_IP6_CONFIG (s_ip6)); + if (method && strcmp (method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) + ip6_used = TRUE; + } + + s_ip4 = make_ip4_setting (parsed, network_file, iscsiadm_path, ip6_used, error); + if (*error) { + g_object_unref (connection); + connection = NULL; + goto done; + } else if (s_ip4) + nm_connection_add_setting (connection, s_ip4); /* iSCSI / ibft connections are read-only since their settings are * stored in NVRAM and can only be changed in BIOS. diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am index b5c94dd3b5..f6879633df 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am @@ -57,7 +57,8 @@ EXTRA_DIST = \ route6-test-wired-ipv6-manual \ ifcfg-test-wired-static-no-prefix-8 \ ifcfg-test-wired-static-no-prefix-16 \ - ifcfg-test-wired-static-no-prefix-24 + ifcfg-test-wired-static-no-prefix-24 \ + ifcfg-test-wired-ipv6-only check-local: @for f in $(EXTRA_DIST); do \ diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only new file mode 100644 index 0000000000..59ec32e5b6 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wired-ipv6-only @@ -0,0 +1,14 @@ +# Intel Corporation 82567LM Gigabit Network Connection +TYPE=Ethernet +DEVICE=eth2 +HWADDR=00:11:22:33:44:ee +ONBOOT=yes +USERCTL=yes +NM_CONTROLLED=yes +PEERDNS=yes +DNS1=1:2:3:4::a +DOMAIN="lorem.com ipsum.org dolor.edu" +IPV6INIT=yes +IPV6_AUTOCONF=no +IPV6ADDR="1001:abba::1234/56" + diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 8855a32191..cfe93d6ec0 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2008 - 2009 Red Hat, Inc. + * Copyright (C) 2008 - 2010 Red Hat, Inc. */ #include @@ -2142,6 +2142,155 @@ test_read_wired_ipv6_manual (void) g_object_unref (connection); } +#define TEST_IFCFG_WIRED_IPV6_ONLY TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wired-ipv6-only" + +static void +test_read_wired_ipv6_only (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + const char *tmp; + const char *expected_id = "System test-wired-ipv6-only"; + const char *expected_address1 = "1001:abba::1234"; + guint32 expected_prefix1 = 56; + const char *expected_dns1 = "1:2:3:4::a"; + NMIP6Address *ip6_addr; + struct in6_addr addr; + + connection = connection_from_file (TEST_IFCFG_WIRED_IPV6_ONLY, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wired-ipv6-only-read", "failed to read %s: %s", TEST_IFCFG_WIRED_IPV6_ONLY, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wired-ipv6-only-verify", "failed to verify %s: %s", TEST_IFCFG_WIRED_IPV6_ONLY, error->message); + + ASSERT (unmanaged == FALSE, + "wired-ipv6-only-verify", "failed to verify %s: unexpected unmanaged value", TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wired-ipv6-only-verify-connection", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ID */ + tmp = nm_setting_connection_get_id (s_con); + ASSERT (tmp != NULL, + "wired-ipv6-only-verify-connection", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + ASSERT (strcmp (tmp, expected_id) == 0, + "wired-ipv6-only-verify-connection", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_CONNECTION_SETTING_NAME, + NM_SETTING_CONNECTION_ID); + + /* ===== WIRED SETTING ===== */ + + s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED)); + ASSERT (s_wired != NULL, + "wired-ipv6-only-verify-wired", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_WIRED_SETTING_NAME); + + /* ===== IPv4 SETTING ===== */ + + s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG)); + ASSERT (s_ip4 == NULL, + "wired-ipv6-only-verify-ip4", "failed to verify %s: unexpected %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP4_CONFIG_SETTING_NAME); + + /* ===== IPv6 SETTING ===== */ + + s_ip6 = NM_SETTING_IP6_CONFIG (nm_connection_get_setting (connection, NM_TYPE_SETTING_IP6_CONFIG)); + ASSERT (s_ip6 != NULL, + "wired-ipv6-only-verify-ip6", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME); + + /* Method */ + tmp = nm_setting_ip6_config_get_method (s_ip6); + ASSERT (strcmp (tmp, NM_SETTING_IP6_CONFIG_METHOD_MANUAL) == 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_METHOD); + + /* IP addresses */ + ASSERT (nm_setting_ip6_config_get_num_addresses (s_ip6) == 1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_ADDRESSES); + + /* Address #1 */ + ip6_addr = nm_setting_ip6_config_get_address (s_ip6, 0); + ASSERT (ip6_addr, + "wired-ipv6-only-verify-ip6", "failed to verify %s: missing IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (nm_ip6_address_get_prefix (ip6_addr) == expected_prefix1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected IP6 address #1 prefix", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + ASSERT (inet_pton (AF_INET6, expected_address1, &addr) > 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: couldn't convert IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_ip6_address_get_address (ip6_addr), &addr), + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected IP6 address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + + /* DNS Addresses */ + ASSERT (nm_setting_ip6_config_get_num_dns (s_ip6) == 1, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + ASSERT (inet_pton (AF_INET6, expected_dns1, &addr) > 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: couldn't convert DNS IP address #1", + TEST_IFCFG_WIRED_IPV6_MANUAL); + ASSERT (IN6_ARE_ADDR_EQUAL (nm_setting_ip6_config_get_dns (s_ip6, 0), &addr), + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value #1", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + /* DNS domains - none as domains are stuffed to 'ipv4' setting */ + ASSERT (nm_setting_ip6_config_get_num_dns_searches (s_ip6) == 0, + "wired-ipv6-only-verify-ip6", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIRED_IPV6_MANUAL, + NM_SETTING_IP6_CONFIG_SETTING_NAME, + NM_SETTING_IP6_CONFIG_DNS); + + g_free (keyfile); + g_free (routefile); + g_free (route6file); + g_object_unref (connection); +} + #define TEST_IFCFG_ONBOOT_NO TEST_IFCFG_DIR"/network-scripts/ifcfg-test-onboot-no" static void @@ -5108,6 +5257,140 @@ test_write_wired_dhcp (void) g_object_unref (reread); } +static void +test_write_wired_static_ip6_only (void) +{ + NMConnection *connection; + NMConnection *reread; + NMSettingConnection *s_con; + NMSettingWired *s_wired; + NMSettingIP6Config *s_ip6; + static unsigned char tmpmac[] = { 0x31, 0x33, 0x33, 0x37, 0xbe, 0xcd }; + GByteArray *mac; + char *uuid; + guint64 timestamp = 0x12344433L; + struct in6_addr ip6; + struct in6_addr dns6; + NMIP6Address *addr6; + gboolean success; + GError *error = NULL; + char *testfile = NULL; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + + inet_pton (AF_INET6, "1003:1234:abcd::1", &ip6); + inet_pton (AF_INET6, "fade:0102:0103::face", &dns6); + + connection = nm_connection_new (); + ASSERT (connection != NULL, + "wired-static-ip6-only-write", "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Write Wired Static IP6 Only", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME, + NM_SETTING_CONNECTION_TIMESTAMP, timestamp, + NULL); + g_free (uuid); + + /* Wired setting */ + s_wired = (NMSettingWired *) nm_setting_wired_new (); + ASSERT (s_wired != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_WIRED_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wired)); + + mac = g_byte_array_sized_new (sizeof (tmpmac)); + g_byte_array_append (mac, &tmpmac[0], sizeof (tmpmac)); + g_object_set (s_wired, NM_SETTING_WIRED_MAC_ADDRESS, mac, NULL); + g_byte_array_free (mac, TRUE); + + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wired-static-ip6-only-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, + NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_MANUAL, + NULL); + + /* Add addresses */ + addr6 = nm_ip6_address_new (); + nm_ip6_address_set_address (addr6, &ip6); + nm_ip6_address_set_prefix (addr6, 11); + nm_setting_ip6_config_add_address (s_ip6, addr6); + nm_ip6_address_unref (addr6); + + /* DNS server */ + nm_setting_ip6_config_add_dns (s_ip6, &dns6); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + "wired-static-ip6-only-write", "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + /* Save the ifcfg */ + success = writer_new_connection (connection, + TEST_SCRATCH_DIR "/network-scripts/", + &testfile, + &error); + ASSERT (success == TRUE, + "wired-static-ip6-only-write", "failed to write connection to disk: %s", + (error && error->message) ? error->message : "(unknown)"); + + ASSERT (testfile != NULL, + "wired-static-ip6-only-write", "didn't get ifcfg file path back after writing connection"); + + /* re-read the connection for comparison */ + reread = connection_from_file (testfile, + NULL, + TYPE_ETHERNET, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + unlink (testfile); + + ASSERT (reread != NULL, + "wired-static-ip6-only-write-reread", "failed to read %s: %s", testfile, error->message); + + ASSERT (nm_connection_verify (reread, &error), + "wired-static-ip6-only-write-reread-verify", "failed to verify %s: %s", testfile, error->message); + + ASSERT (nm_connection_get_setting (reread, NM_TYPE_SETTING_IP4_CONFIG) == NULL, + "wired-static-ip6-only-write-reread-verify", "unexpected IPv4 setting"); + + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, + "wired-static-ip6-only-write", "written and re-read connection weren't the same."); + + if (route6file) + unlink (route6file); + + g_free (testfile); + g_free (keyfile); + g_free (routefile); + g_free (route6file); + g_object_unref (connection); + g_object_unref (reread); +} + + #define TEST_IFCFG_READ_WRITE_STATIC_ROUTES_LEGACY TEST_IFCFG_DIR"/network-scripts/ifcfg-test-static-routes-legacy" static void @@ -7813,6 +8096,7 @@ int main (int argc, char **argv) test_read_wired_static_routes (); test_read_wired_static_routes_legacy (); test_read_wired_ipv6_manual (); + test_read_wired_ipv6_only (); test_read_onboot_no (); test_read_wired_8021x_peap_mschapv2 (); test_read_wifi_open (); @@ -7835,6 +8119,7 @@ int main (int argc, char **argv) test_read_wifi_wep_eap_ttls_chap (); test_write_wired_static (); + test_write_wired_static_ip6_only (); test_write_wired_static_routes (); test_read_write_static_routes_legacy (); test_write_wired_dhcp (); diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index 74f3a59a56..cc24a96f58 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -911,9 +911,30 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error) s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG); if (!s_ip4) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Missing '%s' setting", NM_SETTING_IP4_CONFIG_SETTING_NAME); - return FALSE; + int result; + + /* IPv4 disabled, clear IPv4 related parameters */ + svSetValue (ifcfg, "BOOTPROTO", NULL, FALSE); + for (i = 0; i < 254; i++) { + if (i == 0) { + addr_key = g_strdup ("IPADDR"); + prefix_key = g_strdup ("PREFIX"); + gw_key = g_strdup ("GATEWAY"); + } else { + addr_key = g_strdup_printf ("IPADDR%d", i + 1); + prefix_key = g_strdup_printf ("PREFIX%d", i + 1); + gw_key = g_strdup_printf ("GATEWAY%d", i + 1); + } + + svSetValue (ifcfg, addr_key, NULL, FALSE); + svSetValue (ifcfg, prefix_key, NULL, FALSE); + svSetValue (ifcfg, gw_key, NULL, FALSE); + } + + route_path = utils_get_route_path (ifcfg->fileName); + result = unlink (route_path); + g_free (route_path); + return TRUE; } value = nm_setting_ip4_config_get_method (s_ip4); From 963ae366360bdbddca69c5a87e3ca2949fb59032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 13 Apr 2010 15:57:11 +0200 Subject: [PATCH 089/105] man: manpage updates and cleanups --- man/NetworkManager.8.in | 10 +++++----- man/NetworkManager.conf.5.in | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/man/NetworkManager.8.in b/man/NetworkManager.8.in index 4cd64c753a..a6be073170 100644 --- a/man/NetworkManager.8.in +++ b/man/NetworkManager.8.in @@ -8,7 +8,7 @@ .SH NAME NetworkManager \- network management daemon .SH SYNOPSIS -.B NetworkManager [\-\-no\-daemon] [\-\-pid\-file=] [\-\-state\-file=] [\-\-config=] [\-\-plugins=,plugin2>,...] [\-\-log-level=] [\-\-log-domain=,,...] +.B NetworkManager [\-\-no\-daemon] [\-\-pid\-file=] [\-\-state\-file=] [\-\-config=] [\-\-plugins=,plugin2>,...] [\-\-log\-level=] [\-\-log\-domains=,,...] .SH DESCRIPTION The \fINetworkManager\fP daemon attempts to make networking configuration and operation as painless and automatic as possible by managing the primary network @@ -55,7 +55,7 @@ The system hostname has been updated. Use gethostname(2) to retrieve it. .SH OPTIONS The following options are supported: .TP -.I "\-\-no-daemon" +.I "\-\-no\-daemon" Do not daemonize. This is useful for debugging, and directs log output to the controlling terminal in addition to syslog. .TP @@ -82,13 +82,13 @@ preference over plugins specified in the configuration file. Currently supporte plugins are: keyfile, ifcfg\-rh, ifcfg\-suse, ifupdown. See \fBNetworkManager.conf\fP(5) for more information on the plugins. .TP -.I "\-\-log-level= +.I "\-\-log\-level= Sets how much information NetworkManager sends to the log destination (usually syslog's "daemon" facility). By default, only informational, warning, and error messages are logged. See \fBNetworkManager.conf\fP(5) for more information on log levels and domains. .TP -.I "\-\-log-domains=,, ... +.I "\-\-log\-domains=,, ... Sets which operations are logged to the log destination (usually syslog). By default, most domains are logging-enabled. See \fBNetworkManager.conf\fP(5) for more information on log levels and domains. @@ -96,7 +96,7 @@ more information on log levels and domains. The following environment variables are supported to help debugging. When used in conjunction with the "\-\-no\-daemon" option (thus echoing PPP and DHCP helper output to stdout) these can quickly help pinpoint the source of connection -issues. Also see the \-\-log- and \-\-log-domains to enable debug logging inside +issues. Also see the \-\-log\-level and \-\-log\-domains to enable debug logging inside NetworkManager itself. .TP .I "NM_PPP_DEBUG" diff --git a/man/NetworkManager.conf.5.in b/man/NetworkManager.conf.5.in index 783bafbda6..c3af611675 100644 --- a/man/NetworkManager.conf.5.in +++ b/man/NetworkManager.conf.5.in @@ -16,8 +16,8 @@ where depends on your distribution or build. .SH DESCRIPTION .P .I NetworkManager.conf -is a configuration file for NetworkManager. As the name suggests, it configures -how NetworkManager handles system-wide connection settings. The location of +is a configuration file for NetworkManager. It is used to set up various +aspects of NetworkManager's behavior. The location of the file may be changed through use of the "\-\-config=" argument for \fBNetworkManager\fP (8). @@ -81,11 +81,26 @@ plugin is only provided for simple backward compatibility with SUSE and OpenSUSE Most setups should be using the \fIkeyfile\fP plugin instead. The \fIifcfg\-suse\fP plugin supports reading wired and WiFi connections, but does not support saving any connection types. .RE +.TP +.B dhcp=\fIdhclient\fP | \fIdhcpcd\fP +This key sets up what DHCP client NetworkManager will use. Presently +\fIdhclient\fP and \fIdhcpcd\fP are supported. The client configured here should +be available on your system too. If this key is missing, available DHCP clients +are looked for in this order: dhclient, dhcpcd. .SS [keyfile] This section contains keyfile-specific options and thus only has effect when using \fIkeyfile\fP plugin. .TP .B hostname=\fI\fP Set a persistent hostname when using the \fIkeyfile\fP plugin. +.TP +.B unmanaged-devices=\fImac:\fP;\fImac:\fP;... +Set devices that should be ignored by NetworkManager when using the \fIkeyfile\fP +plugin. Devices are specified in the following format: "mac:", where + is MAC address of the device to be ignored, in lowercase. Multiple +entries are separated by a semicolon. Example: +.nf +unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1e:65:30:d1:c4 +.fi .SS [ifupdown] This section contains ifupdown-specific options and thus only has effect when using \fIifupdown\fP plugin. .TP @@ -99,7 +114,7 @@ some other interface. When the option is missing, \fIfalse\fP value is taken as default. .SS [logging] This section controls NetworkManager's logging. Any settings here are -overridden by the --log-level and --log-domain command-line options. +overridden by the \-\-log\-level and \-\-log\-domains command-line options. .TP .B level=\fI\fP One of [ERR, WARN, INFO, DEBUG]. The ERR level logs only critical errors. WARN From 5a01a0b39e634e2cf3c378deb73f15b16645b76e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 14 Apr 2010 15:16:48 -0700 Subject: [PATCH 090/105] wifi: prevent infinite loop when disposing of supplicant proxy (rh #538717) This has been around a long time, but is very hard to trigger. It appears to happen mostly if the supplicant segfaults on resume but has been seen in other cases as well. For whatever reason, the DBusGProxy's refcount reaches 0 and the proxy gets disposed of. That in turn disposes of all the pending calls that are in-progress on the proxy. Since we give the pending calls a closure, that closure (nm_supplicant_info_destroy) gets called when the pending calls are destroyed. That closure unrefs the proxy again. Since DBusGProxy doesn't have any protection in its dispose() handler against re-entrant disposes (which is arguably a bug of the client) we end up infinite looping in nm_supplicant_info_destroy(). Fix that by ensuring we return early if we detect that we are already freeing the NMSupplicantInfo object, and thus don't try to dispose of the proxy yet again. --- .../nm-supplicant-interface.c | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index da1a856d1b..b91a509c68 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -144,6 +144,7 @@ typedef struct { DBusGProxy *proxy; NMCallStore *store; DBusGProxyCall *call; + gboolean disposing; } NMSupplicantInfo; static NMSupplicantInfo * @@ -164,10 +165,11 @@ nm_supplicant_info_new (NMSupplicantInterface *interface, static void nm_supplicant_info_set_call (NMSupplicantInfo *info, DBusGProxyCall *call) { - if (call) { - nm_call_store_add (info->store, G_OBJECT (info->proxy), (gpointer) call); - info->call = call; - } + g_return_if_fail (info != NULL); + g_return_if_fail (call != NULL); + + nm_call_store_add (info->store, G_OBJECT (info->proxy), (gpointer) call); + info->call = call; } static void @@ -175,13 +177,25 @@ nm_supplicant_info_destroy (gpointer user_data) { NMSupplicantInfo *info = (NMSupplicantInfo *) user_data; - if (info->call) - nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); + /* Guard against double-disposal; since DBusGProxy doesn't guard against + * double-disposal, we could infinite loop here if we're in the middle of + * some wpa_supplicant D-Bus calls. When the supplicant dies we'll dispose + * of the proxy, which kills all its pending calls, which brings us here. + * Then when we unref the proxy here, its dispose() function will get called + * again, and we get right back here until we segfault because our callstack + * is too long. + */ + if (!info->disposing) { + info->disposing = TRUE; - g_object_unref (info->proxy); - g_object_unref (info->interface); + if (info->call) + nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); - g_slice_free (NMSupplicantInfo, info); + g_object_unref (info->proxy); + g_object_unref (info->interface); + + g_slice_free (NMSupplicantInfo, info); + } } From 009336a54c821c4248455f9b10e7ae7d3f895614 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 14 Apr 2010 15:22:48 -0700 Subject: [PATCH 091/105] wifi: robustify supplicant info destruction Zero out the struct so we crash if we ever try to use it after its been freed. --- src/supplicant-manager/nm-supplicant-interface.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index b91a509c68..a65a458f5b 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -188,12 +188,17 @@ nm_supplicant_info_destroy (gpointer user_data) if (!info->disposing) { info->disposing = TRUE; - if (info->call) + if (info->call) { nm_call_store_remove (info->store, G_OBJECT (info->proxy), info->call); + info->call = NULL; + } g_object_unref (info->proxy); + info->proxy = NULL; g_object_unref (info->interface); + info->interface = NULL; + memset (info, 0, sizeof (NMSupplicantInfo)); g_slice_free (NMSupplicantInfo, info); } } From 6d6f7d3d909a69999c33e9caa3abac3eca725498 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 22 Apr 2010 12:27:31 -0700 Subject: [PATCH 092/105] core: ensure errors are dbus-glib accessible (rh #581794) Errors that can possibly be returned from D-Bus method calls need to be registered with dbus-glib. --- libnm-glib/libnm-glib.ver | 1 + src/system-settings/nm-sysconfig-settings.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/libnm-glib/libnm-glib.ver b/libnm-glib/libnm-glib.ver index 1caa2d42ba..dfe4fe5023 100644 --- a/libnm-glib/libnm-glib.ver +++ b/libnm-glib/libnm-glib.ver @@ -129,6 +129,7 @@ global: nm_settings_connection_interface_get_type; nm_settings_connection_interface_update; nm_settings_interface_add_connection; + nm_settings_interface_error_get_type; nm_settings_interface_error_quark; nm_settings_interface_get_connection_by_path; nm_settings_interface_get_type; diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index b120953a3e..0054a9990f 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -1475,7 +1475,12 @@ nm_sysconfig_settings_class_init (NMSysconfigSettingsClass *class) NM_DBUS_IFACE_SETTINGS_SYSTEM, NM_TYPE_SYSCONFIG_SETTINGS_ERROR); + dbus_g_error_domain_register (NM_SETTINGS_INTERFACE_ERROR, + NM_DBUS_IFACE_SETTINGS, + NM_TYPE_SETTINGS_INTERFACE_ERROR); + /* And register all the settings errors with D-Bus */ + dbus_g_error_domain_register (NM_CONNECTION_ERROR, NULL, NM_TYPE_CONNECTION_ERROR); dbus_g_error_domain_register (NM_SETTING_802_1X_ERROR, NULL, NM_TYPE_SETTING_802_1X_ERROR); dbus_g_error_domain_register (NM_SETTING_BLUETOOTH_ERROR, NULL, NM_TYPE_SETTING_BLUETOOTH_ERROR); dbus_g_error_domain_register (NM_SETTING_CDMA_ERROR, NULL, NM_TYPE_SETTING_CDMA_ERROR); From eeca251a27530f7e9cae020df57a47ef10c8e673 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 22 Apr 2010 12:39:48 -0700 Subject: [PATCH 093/105] core: return valid error to dbus-glib (rh #581794) --- libnm-glib/nm-exported-connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libnm-glib/nm-exported-connection.c b/libnm-glib/nm-exported-connection.c index 8ca64e797c..3a8e51ce79 100644 --- a/libnm-glib/nm-exported-connection.c +++ b/libnm-glib/nm-exported-connection.c @@ -228,7 +228,9 @@ impl_exported_connection_get_secrets (NMExportedConnection *self, if (NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets) NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets (self, setting_name, hints, request_new, context); else { - error = g_error_new (0, 0, "%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__); + error = g_error_new (NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__); dbus_g_method_return_error (context, error); g_error_free (error); } From 5a9b7b42d176c2340e146a3e76adfb7d142e02c4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 22 Apr 2010 14:19:50 -0700 Subject: [PATCH 094/105] ifcfg-rh: return valid errors to dbus-glib (rh #581794) --- system-settings/plugins/ifcfg-rh/plugin.c | 26 ++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/system-settings/plugins/ifcfg-rh/plugin.c b/system-settings/plugins/ifcfg-rh/plugin.c index a272728621..47ce0075f8 100644 --- a/system-settings/plugins/ifcfg-rh/plugin.c +++ b/system-settings/plugins/ifcfg-rh/plugin.c @@ -38,6 +38,7 @@ #include #include +#include #include "common.h" #include "nm-dbus-glib-types.h" @@ -535,31 +536,46 @@ impl_ifcfgrh_get_ifcfg_details (SCPluginIfcfg *plugin, const char *path; if (!g_path_is_absolute (in_ifcfg)) { - g_set_error (error, 0, 0, "ifcfg path '%s' is not absolute", in_ifcfg); + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION, + "ifcfg path '%s' is not absolute", in_ifcfg); return FALSE; } connection = g_hash_table_lookup (priv->connections, in_ifcfg); if (!connection) { - g_set_error (error, 0, 0, "ifcfg file '%s' unknown", in_ifcfg); + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION, + "ifcfg file '%s' unknown", in_ifcfg); return FALSE; } s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION); if (!s_con) { - g_set_error_literal (error, 0, 0, "unable to retrieve the connection setting"); + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to retrieve the connection setting"); return FALSE; } uuid = nm_setting_connection_get_uuid (s_con); if (!uuid) { - g_set_error_literal (error, 0, 0, "unable to get the UUID"); + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to get the UUID"); return FALSE; } path = nm_connection_get_path (NM_CONNECTION (connection)); if (!path) { - g_set_error_literal (error, 0, 0, "unable to get the connection D-Bus path"); + g_set_error (error, + NM_SETTINGS_INTERFACE_ERROR, + NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR, + "unable to get the connection D-Bus path"); return FALSE; } From c309a2bc8a27a63b49552c3ecec20bdd6463b555 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 22 Apr 2010 17:14:33 -0700 Subject: [PATCH 095/105] wifi: fix B/G band adhoc wifi auto channel selection --- src/nm-wifi-ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nm-wifi-ap.c b/src/nm-wifi-ap.c index 80b69a3980..c7b5d8a51a 100644 --- a/src/nm-wifi-ap.c +++ b/src/nm-wifi-ap.c @@ -1469,7 +1469,7 @@ channel_to_freq (guint32 channel, const char *band) } else if (!strcmp (band, "bg")) { while (bg_table[i].chan && (bg_table[i].chan != channel)) i++; - return a_table[i].freq; + return bg_table[i].freq; } return 0; From a4cc8873c9981176575c0939c63473b4206db72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 12:13:04 +0200 Subject: [PATCH 096/105] system-settings: fix loading connection by plugins The error case was as follows. When using 'ifupdown,keyfile' plugins and 'eth0' present in /etc/network/interfaces on a Debian-based system, 'ifupdown' plugin, in unmanaged mode, load_connections() prematurely and thus effectively blocked reading connections from 'keyfile' plugin. Patch by Dan and tested by me. --- src/system-settings/nm-sysconfig-settings.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index 0054a9990f..4bcfb04bc7 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -357,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, G_CALLBACK (plugin_connection_added), self); - g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, - G_CALLBACK (unmanaged_specs_changed), self); g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self); nm_system_config_interface_init (plugin, NULL); @@ -368,6 +366,9 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, NULL); + g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, + G_CALLBACK (unmanaged_specs_changed), self); + nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); g_free (pname); g_free (pinfo); @@ -1328,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file, g_object_unref (self); return NULL; } + unmanaged_specs_changed (NULL, self); } return self; From 8315a03632f8b3eeb85ce63518fa3aa2e6917b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 13:12:41 +0200 Subject: [PATCH 097/105] core: return valid error to dbus-glib (rh #581794) --- src/nm-manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index a24606ad99..6eaf6a51ef 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2099,7 +2099,9 @@ system_get_secrets_idle_cb (gpointer user_data) connection = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (priv->sys_settings), info->connection_path); if (!connection) { - error = g_error_new_literal (0, 0, "unknown connection (not exported by system settings)"); + error = g_error_new_literal (NM_MANAGER_ERROR, + NM_MANAGER_ERROR_UNKNOWN_CONNECTION, + "unknown connection (not exported by system settings)"); nm_secrets_provider_interface_get_secrets_result (info->provider, info->setting_name, info->caller, From b0548425d7920e1c3d9cd65754b663380e9051cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 23 Apr 2010 15:25:32 +0200 Subject: [PATCH 098/105] logging: log NetworkManager version; use distribution version when configured --- configure.ac | 8 ++++++++ src/main.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index aedc8ec903..adfe67fe9b 100644 --- a/configure.ac +++ b/configure.ac @@ -164,6 +164,14 @@ if test x"$with_distro" = xpardus; then AC_DEFINE(TARGET_PARDUS, 1, [Define if you have Pardus]) fi +dnl +dnl Distribution version string +dnl +AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=], [Define the NM's distribution version string]), ac_distver=$withval, ac_distver="") +if ! test x"$ac_distver" = x""; then + AC_DEFINE_UNQUOTED(NM_DIST_VERSION, "$ac_distver", [Define the distribution version string]) +fi + AC_MSG_CHECKING([Linux Wireless Extensions >= 18]) AC_TRY_COMPILE([#ifndef __user #define __user diff --git a/src/main.c b/src/main.c index cce2939e39..6bb1121716 100644 --- a/src/main.c +++ b/src/main.c @@ -616,7 +616,10 @@ main (int argc, char *argv[]) nm_logging_start (become_daemon); - nm_log_info (LOGD_CORE, "starting..."); +#if !defined(NM_DIST_VERSION) +# define NM_DIST_VERSION VERSION +#endif + nm_log_info (LOGD_CORE, "NetworkManager-" NM_DIST_VERSION " is starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE); From e46577ffe5b805e857d3de85530a4c6b8a10e83e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 Apr 2010 12:12:47 -0700 Subject: [PATCH 099/105] core: rearrange version macros a bit --- src/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 6bb1121716..1d0ab5328c 100644 --- a/src/main.c +++ b/src/main.c @@ -53,6 +53,10 @@ #include "nm-vpn-manager.h" #include "nm-logging.h" +#if !defined(NM_DIST_VERSION) +# define NM_DIST_VERSION VERSION +#endif + #define NM_DEFAULT_PID_FILE LOCALSTATEDIR"/run/NetworkManager.pid" #define NM_DEFAULT_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/NetworkManager.conf" #define NM_OLD_SYSTEM_CONF_FILE SYSCONFDIR"/NetworkManager/nm-system-settings.conf" @@ -616,10 +620,7 @@ main (int argc, char *argv[]) nm_logging_start (become_daemon); -#if !defined(NM_DIST_VERSION) -# define NM_DIST_VERSION VERSION -#endif - nm_log_info (LOGD_CORE, "NetworkManager-" NM_DIST_VERSION " is starting..."); + nm_log_info (LOGD_CORE, "NetworkManager (version " NM_DIST_VERSION ") is starting..."); success = FALSE; main_loop = g_main_loop_new (NULL, FALSE); From f20f7294f6f46847bc4c6bb8edeac6fdc810d113 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 Apr 2010 14:20:10 -0700 Subject: [PATCH 100/105] ifcfg-rh: fix handling of WEP passphrases (rh #581718) ifcfg-rh wasn't updated for WEP passphrases after that capability got added. Can't use KEY for passphrases since there's no way to distinguish some WEP passphrases from some WEP Hex and ASCII keys, so we use KEY_PASSPHRASE instead. --- system-settings/plugins/ifcfg-rh/reader.c | 90 ++++-- .../tests/network-scripts/Makefile.am | 4 +- .../ifcfg-test-wifi-wep-passphrase | 14 + .../keys-test-wifi-wep-passphrase | 1 + .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 295 ++++++++++++++++++ system-settings/plugins/ifcfg-rh/writer.c | 42 ++- 6 files changed, 403 insertions(+), 43 deletions(-) create mode 100644 system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase create mode 100644 system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index 32575f3953..4149e6cd76 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -1578,6 +1578,7 @@ static gboolean add_one_wep_key (shvarFile *ifcfg, const char *shvar_key, guint8 key_idx, + gboolean passphrase, NMSettingWirelessSecurity *s_wsec, GError **error) { @@ -1597,42 +1598,51 @@ add_one_wep_key (shvarFile *ifcfg, } /* Validate keys */ - if (strlen (value) == 10 || strlen (value) == 26) { - /* Hexadecimal WEP key */ - char *p = value; - - while (*p) { - if (!g_ascii_isxdigit (*p)) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Invalid hexadecimal WEP key."); - goto out; - } - p++; + if (passphrase) { + if (strlen (value) && strlen (value) < 64) { + key = g_strdup (value); + g_object_set (G_OBJECT (s_wsec), + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, + NM_WEP_KEY_TYPE_PASSPHRASE, + NULL); } - key = g_strdup (value); - } else if ( strncmp (value, "s:", 2) - && (strlen (value) == 7 || strlen (value) == 15)) { - /* ASCII passphrase */ - char *p = value + 2; - - while (*p) { - if (!isascii ((int) (*p))) { - g_set_error (error, ifcfg_plugin_error_quark (), 0, - "Invalid ASCII WEP passphrase."); - goto out; - } - p++; - } - - key = utils_bin2hexstr (value, strlen (value), strlen (value) * 2); } else { - g_set_error (error, ifcfg_plugin_error_quark (), 0, "Invalid WEP key length."); + if (strlen (value) == 10 || strlen (value) == 26) { + /* Hexadecimal WEP key */ + char *p = value; + + while (*p) { + if (!g_ascii_isxdigit (*p)) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid hexadecimal WEP key."); + goto out; + } + p++; + } + key = g_strdup (value); + } else if ( strncmp (value, "s:", 2) + && (strlen (value) == 7 || strlen (value) == 15)) { + /* ASCII passphrase */ + char *p = value + 2; + + while (*p) { + if (!isascii ((int) (*p))) { + g_set_error (error, ifcfg_plugin_error_quark (), 0, + "Invalid ASCII WEP passphrase."); + goto out; + } + p++; + } + + key = utils_bin2hexstr (value, strlen (value), strlen (value) * 2); + } } if (key) { nm_setting_wireless_security_set_wep_key (s_wsec, key_idx, key); success = TRUE; - } + } else + g_set_error (error, ifcfg_plugin_error_quark (), 0, "Invalid WEP key length."); out: g_free (value); @@ -1645,15 +1655,26 @@ read_wep_keys (shvarFile *ifcfg, NMSettingWirelessSecurity *s_wsec, GError **error) { - if (!add_one_wep_key (ifcfg, "KEY1", 0, s_wsec, error)) + /* Try hex/ascii keys first */ + if (!add_one_wep_key (ifcfg, "KEY1", 0, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY2", 1, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY2", 1, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY3", 2, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY3", 2, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY4", 3, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY4", 3, FALSE, s_wsec, error)) return FALSE; - if (!add_one_wep_key (ifcfg, "KEY", def_idx, s_wsec, error)) + if (!add_one_wep_key (ifcfg, "KEY", def_idx, FALSE, s_wsec, error)) + return FALSE; + + /* And then passphrases */ + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE1", 0, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE2", 1, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE3", 2, TRUE, s_wsec, error)) + return FALSE; + if (!add_one_wep_key (ifcfg, "KEY_PASSPHRASE4", 3, TRUE, s_wsec, error)) return FALSE; return TRUE; @@ -1701,6 +1722,7 @@ make_wep_setting (shvarFile *ifcfg, goto error; } svCloseFile (keys_ifcfg); + g_assert (error == NULL || *error == NULL); } /* If there's a default key, ensure that key exists */ diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am index f6879633df..66435acbcb 100644 --- a/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.am @@ -58,7 +58,9 @@ EXTRA_DIST = \ ifcfg-test-wired-static-no-prefix-8 \ ifcfg-test-wired-static-no-prefix-16 \ ifcfg-test-wired-static-no-prefix-24 \ - ifcfg-test-wired-ipv6-only + ifcfg-test-wired-ipv6-only \ + ifcfg-test-wifi-wep-passphrase \ + keys-test-wifi-wep-passphrase check-local: @for f in $(EXTRA_DIST); do \ diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase new file mode 100644 index 0000000000..250efa134c --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-wifi-wep-passphrase @@ -0,0 +1,14 @@ +TYPE=Wireless +DEVICE=eth2 +HWADDR=00:16:41:11:22:33 +NM_CONTROLLED=yes +BOOTPROTO=dhcp +ESSID=blahblah +CHANNEL=1 +MODE=Managed +RATE=auto +ONBOOT=yes +USERCTL=yes +PEERDNS=yes +IPV6INIT=no +SECURITYMODE=open diff --git a/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase b/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase new file mode 100644 index 0000000000..d45c0ea8e8 --- /dev/null +++ b/system-settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wep-passphrase @@ -0,0 +1 @@ +KEY_PASSPHRASE1="foobar222blahblah" diff --git a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index cfe93d6ec0..c96d13adb7 100644 --- a/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/system-settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -3004,6 +3004,7 @@ test_read_wifi_wep (void) const char *expected_mode = "infrastructure"; const guint32 expected_channel = 1; const char *expected_wep_key0 = "0123456789abcdef0123456789"; + NMWepKeyType key_type; connection = connection_from_file (TEST_IFCFG_WIFI_WEP, NULL, @@ -3175,6 +3176,13 @@ test_read_wifi_wep (void) NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX); + /* WEP key type */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + ASSERT (key_type == NM_WEP_KEY_TYPE_UNKNOWN || key_type == NM_WEP_KEY_TYPE_KEY, + "wifi-wep-verify-wireless", "failed to verify %s: unexpected WEP key type %d", + TEST_IFCFG_WIFI_WEP, + key_type); + /* WEP key index 0 */ tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0); ASSERT (tmp != NULL, @@ -3508,6 +3516,142 @@ test_read_wifi_wep_adhoc (void) g_object_unref (connection); } +#define TEST_IFCFG_WIFI_WEP_PASSPHRASE TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-wep-passphrase" + +static void +test_read_wifi_wep_passphrase (void) +{ + NMConnection *connection; + NMSettingConnection *s_con; + NMSettingWireless *s_wireless; + NMSettingWirelessSecurity *s_wsec; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GError *error = NULL; + const char *tmp; + const char *expected_wep_key0 = "foobar222blahblah"; + NMWepKeyType key_type; + + connection = connection_from_file (TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NULL, + TYPE_WIRELESS, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + ASSERT (connection != NULL, + "wifi-wep-passphrase-read", "failed to read %s: %s", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, error->message); + + ASSERT (nm_connection_verify (connection, &error), + "wifi-wep-passphrase-verify", "failed to verify %s: %s", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, error->message); + + /* ===== CONNECTION SETTING ===== */ + + s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION)); + ASSERT (s_con != NULL, + "wifi-wep-passphrase-verify-connection", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_CONNECTION_SETTING_NAME); + + /* ===== WIRELESS SETTING ===== */ + + s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS)); + ASSERT (s_wireless != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME); + + /* Security */ + tmp = nm_setting_wireless_get_security (s_wireless); + ASSERT (tmp != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME, + NM_SETTING_WIRELESS_SEC); + ASSERT (strcmp (tmp, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SETTING_NAME, + NM_SETTING_WIRELESS_SEC); + + + /* ===== WIRELESS SECURITY SETTING ===== */ + + s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY)); + ASSERT (s_wsec != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s setting", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); + + /* Key management */ + ASSERT (strcmp (nm_setting_wireless_security_get_key_mgmt (s_wsec), "none") == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT); + + /* WEP key index */ + ASSERT (nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX); + + /* WEP key type */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + ASSERT (key_type == NM_WEP_KEY_TYPE_PASSPHRASE, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected WEP key type %d", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + key_type); + + /* WEP key index 0 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 0); + ASSERT (tmp != NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: missing %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); + ASSERT (strcmp (tmp, expected_wep_key0) == 0, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key value", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY0); + + /* WEP key index 1 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 1); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY1); + + /* WEP key index 2 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 2); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY2); + + /* WEP key index 3 */ + tmp = nm_setting_wireless_security_get_wep_key (s_wsec, 3); + ASSERT (tmp == NULL, + "wifi-wep-passphrase-verify-wireless", "failed to verify %s: unexpected %s / %s key", + TEST_IFCFG_WIFI_WEP_PASSPHRASE, + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NM_SETTING_WIRELESS_SECURITY_WEP_KEY3); + + g_object_unref (connection); +} + #define TEST_IFCFG_WIFI_LEAP TEST_IFCFG_DIR"/network-scripts/ifcfg-test-wifi-leap" static void @@ -6419,6 +6563,155 @@ test_write_wifi_wep_adhoc (void) g_object_unref (reread); } +static void +test_write_wifi_wep_passphrase (void) +{ + NMConnection *connection; + NMConnection *reread; + NMSettingConnection *s_con; + NMSettingWireless *s_wifi; + NMSettingWirelessSecurity *s_wsec; + NMSettingIP4Config *s_ip4; + NMSettingIP6Config *s_ip6; + char *uuid; + gboolean success; + GError *error = NULL; + char *testfile = NULL; + char *unmanaged = NULL; + char *keyfile = NULL; + char *routefile = NULL; + char *route6file = NULL; + gboolean ignore_error = FALSE; + GByteArray *ssid; + const unsigned char ssid_data[] = "blahblah"; + struct stat statbuf; + + connection = nm_connection_new (); + ASSERT (connection != NULL, + "wifi-wep-passphrase-write", "failed to allocate new connection"); + + /* Connection setting */ + s_con = (NMSettingConnection *) nm_setting_connection_new (); + ASSERT (s_con != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_CONNECTION_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_con)); + + uuid = nm_utils_uuid_generate (); + g_object_set (s_con, + NM_SETTING_CONNECTION_ID, "Test Write Wifi WEP Passphrase", + NM_SETTING_CONNECTION_UUID, uuid, + NM_SETTING_CONNECTION_AUTOCONNECT, TRUE, + NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME, + NULL); + g_free (uuid); + + /* Wifi setting */ + s_wifi = (NMSettingWireless *) nm_setting_wireless_new (); + ASSERT (s_wifi != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_WIRELESS_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wifi)); + + ssid = g_byte_array_sized_new (sizeof (ssid_data)); + g_byte_array_append (ssid, ssid_data, sizeof (ssid_data)); + + g_object_set (s_wifi, + NM_SETTING_WIRELESS_SSID, ssid, + NM_SETTING_WIRELESS_MODE, "infrastructure", + NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, + NULL); + + g_byte_array_free (ssid, TRUE); + + /* Wireless security setting */ + s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new (); + ASSERT (s_wsec != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_wsec)); + + g_object_set (s_wsec, + NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none", + NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 0, + NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "shared", + NM_SETTING_WIRELESS_SECURITY_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_PASSPHRASE, + NULL); + nm_setting_wireless_security_set_wep_key (s_wsec, 0, "asdfdjaslfjasd;flasjdfl;aksdf"); + + /* IP4 setting */ + s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); + ASSERT (s_ip4 != NULL, + "wifi-wep-passphrase-write", "failed to allocate new %s setting", + NM_SETTING_IP4_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + + g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL); + + /* IP6 setting */ + s_ip6 = (NMSettingIP6Config *) nm_setting_ip6_config_new (); + ASSERT (s_ip6 != NULL, + "wifi-wep-adhoc-write", "failed to allocate new %s setting", + NM_SETTING_IP6_CONFIG_SETTING_NAME); + nm_connection_add_setting (connection, NM_SETTING (s_ip6)); + + g_object_set (s_ip6, NM_SETTING_IP6_CONFIG_METHOD, NM_SETTING_IP6_CONFIG_METHOD_IGNORE, NULL); + + ASSERT (nm_connection_verify (connection, &error) == TRUE, + "wifi-wep-passphrase-write", "failed to verify connection: %s", + (error && error->message) ? error->message : "(unknown)"); + + /* Save the ifcfg */ + success = writer_new_connection (connection, + TEST_SCRATCH_DIR "/network-scripts/", + &testfile, + &error); + ASSERT (success == TRUE, + "wifi-wep-passphrase-write", "failed to write connection to disk: %s", + (error && error->message) ? error->message : "(unknown)"); + + ASSERT (testfile != NULL, + "wifi-wep-passphrase-write", "didn't get ifcfg file path back after writing connection"); + + /* re-read the connection for comparison */ + reread = connection_from_file (testfile, + NULL, + TYPE_WIRELESS, + NULL, + &unmanaged, + &keyfile, + &routefile, + &route6file, + &error, + &ignore_error); + unlink (testfile); + + ASSERT (keyfile != NULL, + "wifi-wep-passphrase-write-reread", "expected keyfile for '%s'", testfile); + + ASSERT (stat (keyfile, &statbuf) == 0, + "wifi-wep-passphrase-write-reread", "couldn't stat() '%s'", keyfile); + ASSERT (S_ISREG (statbuf.st_mode), + "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't a normal file", keyfile); + ASSERT ((statbuf.st_mode & 0077) == 0, + "wifi-wep-passphrase-write-reread", "keyfile '%s' wasn't readable only by its owner", keyfile); + + unlink (keyfile); + + ASSERT (reread != NULL, + "wifi-wep-passphrase-write-reread", "failed to read %s: %s", testfile, error->message); + + ASSERT (nm_connection_verify (reread, &error), + "wifi-wep-passphrase-write-reread-verify", "failed to verify %s: %s", testfile, error->message); + + ASSERT (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT) == TRUE, + "wifi-wep-passphrase-write", "written and re-read connection weren't the same."); + + g_free (testfile); + g_object_unref (connection); + g_object_unref (reread); +} + static void test_write_wifi_leap (void) { @@ -8108,6 +8401,7 @@ int main (int argc, char **argv) test_read_wifi_open_ssid_quoted (); test_read_wifi_wep (); test_read_wifi_wep_adhoc (); + test_read_wifi_wep_passphrase (); test_read_wifi_leap (); test_read_wifi_wpa_psk (); test_read_wifi_wpa_psk_unquoted (); @@ -8128,6 +8422,7 @@ int main (int argc, char **argv) test_write_wifi_open_hex_ssid (); test_write_wifi_wep (); test_write_wifi_wep_adhoc (); + test_write_wifi_wep_passphrase (); test_write_wifi_leap (); test_write_wifi_wpa_psk ("Test Write Wifi WPA PSK", "wifi-wpa-psk-write", diff --git a/system-settings/plugins/ifcfg-rh/writer.c b/system-settings/plugins/ifcfg-rh/writer.c index cc24a96f58..d8df2d3fe9 100644 --- a/system-settings/plugins/ifcfg-rh/writer.c +++ b/system-settings/plugins/ifcfg-rh/writer.c @@ -579,20 +579,46 @@ write_wireless_security_setting (NMConnection *connection, } } + /* WEP keys */ + + /* Clear existing keys */ + set_secret (ifcfg, "KEY", NULL, FALSE); /* Clear any default key */ + for (i = 0; i < 4; i++) { + tmp = g_strdup_printf ("KEY_PASSPHRASE%d", i + 1); + set_secret (ifcfg, tmp, NULL, FALSE); + g_free (tmp); + + tmp = g_strdup_printf ("KEY%d", i + 1); + set_secret (ifcfg, tmp, NULL, FALSE); + g_free (tmp); + } + + /* And write the new ones out */ if (wep) { /* Default WEP TX key index */ tmp = g_strdup_printf ("%d", nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec) + 1); svSetValue (ifcfg, "DEFAULTKEY", tmp, FALSE); g_free (tmp); - } - /* WEP keys */ - set_secret (ifcfg, "KEY", NULL, FALSE); /* Clear any default key */ - for (i = 0; i < 4; i++) { - key = nm_setting_wireless_security_get_wep_key (s_wsec, i); - tmp = g_strdup_printf ("KEY%d", i + 1); - set_secret (ifcfg, tmp, (wep && key) ? key : NULL, FALSE); - g_free (tmp); + for (i = 0; i < 4; i++) { + NMWepKeyType key_type; + + key = nm_setting_wireless_security_get_wep_key (s_wsec, i); + if (key) { + /* Passphrase needs a different ifcfg key since with WEP, there + * are some passphrases that are indistinguishable from WEP hex + * keys. + */ + key_type = nm_setting_wireless_security_get_wep_key_type (s_wsec); + if (key_type == NM_WEP_KEY_TYPE_PASSPHRASE) + tmp = g_strdup_printf ("KEY_PASSPHRASE%d", i + 1); + else + tmp = g_strdup_printf ("KEY%d", i + 1); + + set_secret (ifcfg, tmp, key, FALSE); + g_free (tmp); + } + } } /* WPA protos */ From f8d1d7e83238146a81433474645767386c015713 Mon Sep 17 00:00:00 2001 From: Krishna Babu K Date: Sat, 24 Apr 2010 00:13:31 -0700 Subject: [PATCH 101/105] po: update Telugu translation (bgo #616399) --- po/te.po | 75 ++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/po/te.po b/po/te.po index 811c8ede72..4d9101b69d 100644 --- a/po/te.po +++ b/po/te.po @@ -7,16 +7,19 @@ msgid "" msgstr "" "Project-Id-Version: te\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-29 15:19+0530\n" -"PO-Revision-Date: 2010-04-07 14:59+0530\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-21 03:24+0000\n" +"PO-Revision-Date: 2010-04-21 18:32+0530\n" "Last-Translator: Krishna Babu K \n" "Language-Team: Telugu \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"\n" +"\n" "\n" "\n" @@ -1179,77 +1182,82 @@ msgstr "PKCS#12 ఫైలు నిర్దారించలేక పోయ msgid "Could not generate random data." msgstr "యాదృశ్చిక డాటాను జనియింపచేయలేక పోయింది." -#: ../libnm-util/nm-utils.c:1802 +#: ../libnm-util/nm-utils.c:1818 #, c-format msgid "Not enough memory to make encryption key." msgstr "ఎన్క్రిప్షన్ కీను తయారుచేయుటకు సరిపోవు మెమొరీ లేదు." -#: ../libnm-util/nm-utils.c:1912 +#: ../libnm-util/nm-utils.c:1928 msgid "Could not allocate memory for PEM file creation." msgstr "మెమొరీను PEM ఫైలు సృష్టీకరణ కొరకు కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1924 +#: ../libnm-util/nm-utils.c:1940 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "IVను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1936 +#: ../libnm-util/nm-utils.c:1952 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." msgstr "ఎన్క్రిప్టు చేసిన కీను PEM ఫైలునకు వ్రాయుటకు మెమొరీను కేటాయించలేక పోయింది." -#: ../libnm-util/nm-utils.c:1955 +#: ../libnm-util/nm-utils.c:1971 #, c-format msgid "Could not allocate memory for PEM file data." msgstr "PEM ఫైలు డాటా కొరకు మెమొరీను కేటాయించలేక పోయింది." -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 -#: ../src/nm-netlink-monitor.c:582 -#: ../src/ip6-manager/nm-netlink-listener.c:352 +#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:463 +#: ../src/nm-netlink-monitor.c:581 +#: ../src/ip6-manager/nm-netlink-listener.c:351 #, c-format msgid "error processing netlink message: %s" msgstr "నెట్‌లింక్ సందేశమును ప్రోసెసింగ్ చేయుటలో దోషము: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:259 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు హాండిల్‌ను కేటాయించలేక పోయింది: %s" -#: ../src/nm-netlink-monitor.c:270 +#: ../src/nm-netlink-monitor.c:269 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకుకు అనుసంధానము కాలేకపోయింది: %s" -#: ../src/nm-netlink-monitor.c:278 +#: ../src/nm-netlink-monitor.c:277 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు సమూహమును కలుపలేక పోయింది:%s" -#: ../src/nm-netlink-monitor.c:286 +#: ../src/nm-netlink-monitor.c:285 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "లింకు స్థితిని పర్యవేక్షించుటకు నెట్‌లింకు క్యాచీని కేటాయించలేక పోయింది: %s" -#: ../src/nm-netlink-monitor.c:494 -#: ../src/ip6-manager/nm-netlink-listener.c:382 +#: ../src/nm-netlink-monitor.c:493 +#: ../src/ip6-manager/nm-netlink-listener.c:381 msgid "error occurred while waiting for data on socket" msgstr "సాకెట్ నందు డాటా కొరకు వేచివుండునప్పుడు దోషము సంభవించినది" -#: ../src/nm-netlink-monitor.c:558 ../src/nm-netlink-monitor.c:571 +#: ../src/nm-netlink-monitor.c:557 ../src/nm-netlink-monitor.c:570 #, c-format msgid "error updating link cache: %s" msgstr "లింకు క్యాచీని నవీకరించుటలో దోషము: %s" -#: ../src/main.c:494 +#: ../src/main.c:498 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "చెల్లని ఐచ్చికము. చెల్లునటువంటి ఐచ్చికముల జాబితా కొరకు --help వుపయోగించండి.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:324 +#: ../src/main.c:558 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. చెల్లునటువంటి ఐచ్చికముల జాబితా చూచుటకు దయచేసి --help వుపయోగించుము.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# నెట్వర్కునిర్వాహిక ద్వారా సృష్టించబడింది\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:340 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -1275,26 +1283,36 @@ msgstr "'dhcpcd' కనుగొనబడ గలదు." msgid "unsupported DHCP client '%s'" msgstr "మద్దతీయని DHCP క్లైంట్ '%s'" -#: ../src/ip6-manager/nm-netlink-listener.c:200 +#: ../src/ip6-manager/nm-netlink-listener.c:199 #, c-format msgid "unable to allocate netlink handle: %s" msgstr "నెట్‌లింక్ సంభాలికను కేటాయించలేక పోయింది: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:210 +#: ../src/ip6-manager/nm-netlink-listener.c:209 #, c-format msgid "unable to connect to netlink: %s" msgstr "నెట్‌లింక్‌కు అనుసంధానము కాలేకపోయింది: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:307 +#: ../src/ip6-manager/nm-netlink-listener.c:306 #, c-format msgid "unable to join netlink group: %s" msgstr "నెట్‌లింకు సమూహాన్ని చేర్చుకొనలేక పోయింది: %s" -#: ../src/named-manager/nm-named-manager.c:315 +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "తెలియని లాగ్ స్థాయి '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "తెలియని లాగ్ డొమైన్ '%s'" + +#: ../src/named-manager/nm-named-manager.c:314 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "గమనిక: libc రిజాల్వర్ 3 నామపు సేవికలకన్నా యెక్కువ వాటికి మద్దతివ్వలేదు." -#: ../src/named-manager/nm-named-manager.c:317 +#: ../src/named-manager/nm-named-manager.c:316 msgid "The nameservers listed below may not be recognized." msgstr "క్రిందన జాబితాచేసివున్న నామపుసేవికలు గుర్తించబడక పోవచ్చును." @@ -1303,7 +1321,7 @@ msgstr "క్రిందన జాబితాచేసివున్న న msgid "Auto %s" msgstr "స్వయంచాలక %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3229 msgid "System" msgstr "సిస్టమ్" @@ -1338,4 +1356,3 @@ msgstr "రక్షిత WiFi నెట్వర్కు ద్వారా #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 msgid "System policy prevents sharing connections via an open WiFi network" msgstr "ఓపెన్ WiFi నెట్వర్కు ద్వారా అనుసంధానములను భాగస్వామ్యపరచుట సిస్టమ్ విధానము నిరోధించుచున్నది" - From 9f01ed9f9a25696f16cb3fcef22cecb086ffe6c0 Mon Sep 17 00:00:00 2001 From: Shankar Prasad Date: Sat, 24 Apr 2010 00:14:45 -0700 Subject: [PATCH 102/105] po: update Kannada translation (bgo #616625) --- po/kn.po | 1002 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 931 insertions(+), 71 deletions(-) diff --git a/po/kn.po b/po/kn.po index 3a433c8dfd..bd04652a29 100644 --- a/po/kn.po +++ b/po/kn.po @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: NetworkManager.po.master.kn\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug." -"cgi?product=NetworkManager&component=general\n" -"POT-Creation-Date: 2009-09-29 03:25+0000\n" -"PO-Revision-Date: 2010-02-10 14:31+0530\n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-21 03:24+0000\n" +"PO-Revision-Date: 2010-04-20 18:07+0530\n" "Last-Translator: Shankar Prasad \n" "Language-Team: kn-IN <>\n" "MIME-Version: 1.0\n" @@ -19,6 +19,850 @@ msgstr "" "X-Generator: Lokalize 1.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"ಬಳಕೆ: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "ಬಗೆ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "ಹೆಸರು" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "ವ್ಯವಸ್ಥೆಯ ಸಂಪರ್ಕಗಳು:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "ಬಳಕೆದಾರ ಸಂಪರ್ಕಗಳು:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "ದೋಷ: %s ಆರ್ಗ್ಯುಮೆಂಟ್ ಕಾಣಿಸುತ್ತಿಲ್ಲ" + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "ದೋಷ: %s - ಅಂತಹ ಯಾವುದೆ ಸಂಪರ್ಕಗಳಿಲ್ಲ." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "ವ್ಯವಸ್ಥೆಯಾದ್ಯಂತದ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "ಬಳಕೆದಾರ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "ಗೊತ್ತಿರದ ನಿಯತಾಂಕಗಳು: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "ದೋಷ: ಮಾನ್ಯವಾದ ಯಾವುದೆ ನಿಯತಾಂಖವನ್ನು ಸೂಚಿಸಲಾಗಿಲ್ಲ." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "ಹೌದು" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "ಇಲ್ಲ" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕಗಳು" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "ಪೂರ್ವನಿಯೋಜಿತ" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "ಸೇವೆ" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "ಸಾಧನಗಳು" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "'%s' ಎಂಬ ಸಾಧನದಲ್ಲಿ ಯಾವುದೆ ಸಕ್ರಿಯ ಸಂಪರ್ಕವು ಕಂಡುಬಂದಿಲ್ಲ" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "ಯಾವುದೆ ಸಕ್ರಿಯ ಸಂಪರ್ಕ ಅಥವ ಸಾಧನವು ಕಂಡುಬಂದಿಲ್ಲ" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "ಸಕ್ರಿಯಗೊಳ್ಳುತ್ತಿದೆ" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "ಸಕ್ರಿಯಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "ಗೊತ್ತಿಲ್ಲದ" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಿದ್ಧಗೊಳಿಕೆ)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ದೃಢೀಕರಣದ ಅಗತ್ಯವಿದೆ)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN ಸಂಪರ್ಕಿತಗೊಳ್ಳುತ್ತಿದೆ" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN ಸಂಪರ್ಕಗೊಂಡಿದೆ (IP ಸಂರಚನೆಯನ್ನು ಪಡೆಯಲಾಗುತ್ತಿದೆ)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN ಸಂಪರ್ಕಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN ಸಂಪರ್ಕವು ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN ಸಂಪರ್ಕ ಕಡಿದಿದೆ" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "ಗೊತ್ತಿರದ ಕಾರಣ" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "ಯಾವುದೂ ಇಲ್ಲ" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "ಬಳಕೆದಾರರೊಂದಿಗೆ ಸಂಪರ್ಕ ಕಡಿದುಹೋಗಿದೆ" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "ಮೂಲ ಜಾಲಬಂಧ ಸಂಪರ್ಕಕ್ಕೆ ತಡೆಯುಂಟಾಗಿದೆ" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "VPN ಸೇವೆಯನ್ನು ಅನಿರೀಕ್ಷಿತವಾಗಿ ನಿಲ್ಲಿಸಲಾಗಿದೆ" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "VPN ಸೇವೆಯು ಅಮಾನ್ಯವಾದ ಸಂರಚನೆಯನ್ನು ಮರಳಿಸಿದೆ" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "ಸಂಪರ್ಕದ ಪ್ರಯತ್ನದ ಕಾಲಾವಧಿ ಮೀರಿದೆ" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "VPN ಸೇವೆಯು ಸರಿಯಾದ ಸಮಯದಲ್ಲಿ ಆರಂಭಗೊಳ್ಳಲಿಲ್ಲ" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "VPN ಸೇವೆಯು ಆರಂಭಗೊಳ್ಳಲು ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "ಯಾವುದೆ ಮಾನ್ಯವಾದ VPN ರಹಸ್ಯಗಳಿಲ್ಲ (ಸೀಕ್ರೇಟ್‌ಗಳಿಲ್ಲ)" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "ಅಮಾನ್ಯವಾದ VPN ರಹಸ್ಯಗಳು" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "ಸಂಪರ್ಕವನ್ನು ತೆಗೆದು ಹಾಕಲಾಗಿದೆ" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "ಸ್ಥಿತಿ: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "ಸಂಪರ್ಕವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "ದೋಷ: ಸಂಪರ್ಕವನ್ನು ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "ಸ್ಥಿತಿ: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "ದೋಷ: ಸಂಪರ್ಕ ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ: %s." + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "ದೋಷ: ಕಾಲಾವಧಿ %d sec ತೀರಿದೆ." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "ದೋಷ: ಸಂಪರ್ಕ ಸಕ್ರಿಯಗೊಳಿಕೆಯು ವಿಫಲಗೊಂಡಿದೆ: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "ದೋಷ: '%s' ಗಾಗಿ ಸಕ್ರಿಯ ಸಂಪರ್ಕವನ್ನು ಪಡೆಯುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕದ ಸ್ಥಿತಿ: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "ಸಕ್ರಿಯ ಸಂಪರ್ಕ ಮಾರ್ಗ: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "ದೋಷ: ಗೊತ್ತಿರದ ಸಂಪರ್ಕ: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ ಕಾಲಾವಧಿ ತೀರಿಕೆ ಮೌಲ್ಯವು ಅಮಾನ್ಯವಾಗಿದೆ." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "ದೋಷ: id ಅಥವ uuid ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "ದೋಷ: ಯಾವುದೆ ಸೂಕ್ತವಾದ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "ದೋಷ: ಯಾವುದೆ ಸೂಕ್ತವಾದ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "ಎಚ್ಚರಿಕೆ: ಸಂಪರ್ಕವು ಸಕ್ರಿಯವಾಗಿಲ್ಲ\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "ದೋಷ: 'con' ಆಜ್ಷೆ '%s' ಎಂಬುದು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "ದೋಷ: D-Bus ನೊಂದಿಗೆ ಸಂಪರ್ಕಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "ದೋಷ: ವ್ಯವಸ್ಥೆಯ ಸಿದ್ಧತೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "ದೋಷ: ಬಳಕೆದಾರ ಸಿದ್ಧತೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "ದೋಷ: ಸಂಪರ್ಕಗಳನ್ನು ಪಡೆಯಲಾಗಿಲ್ಲ: ಸಿದ್ಧತೆಗಳು ಚಾಲನೆಯಲ್ಲಿಲ್ಲ." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"ಬಳಕೆ: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "ನಿರ್ವಹಿಸದೆ ಇರುವ" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "ಲಭ್ಯವಿಲ್ಲ" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "ಸಂಪರ್ಕಕಡಿದು ಹೋಗಿದೆ" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಿದ್ಧಗೊಳಿಕೆ)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ಸಂರಚಿಸುವಿಕೆ)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (ದೃಢೀಕರಣದ ಅಗತ್ಯವಿದೆ)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ (IP ಸಂರಚನೆಯನ್ನು ಪಡೆಯಲಾಗುತ್ತಿದೆ)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "ಸಂಪರ್ಕಗೊಂಡಿದೆ" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "ಸಂಪರ್ಕ ವಿಫಲಗೊಂಡಿದೆ" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "ಗೊತ್ತಿರದ" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(ಯಾವುದೂ ಇಲ್ಲ)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: IP4 ವಿಳಾಸ 0x%X ಅನ್ನು ಪರಿವರ್ತಿಸುವಲ್ಲಿ ದೋಷ" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, ಫ್ರೀಕ್ವೆ %d MHz, ದರ %d Mb/s, ದೃಢತೆ %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "ತಾತ್ಕಾಲಿಕ" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", ಗೂಢಲಿಪೀಕರಣಗೊಂಡ: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " ಎಂಟರ್ಪೈಸ್" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "ಸಾಧನ" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "ಚಾಲಕ" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(ಗೊತ್ತಿರದ)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "ಸ್ಥಿತಿ" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW ವಿಳಾಸ" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" ಸಾಮಾರ್ಥ್ಯಗಳು:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "ಕ್ಯಾರಿಯರ್ ಪತ್ತೆ" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "ವೇಗ" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" ವೈರ್ಲೆಸ್‌ ಗುಣಧರ್ಮಗಳು\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "WEP ಗೂಢಲಿಪೀಕರಣ" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "WPA ಗೂಢಲಿಪೀಕರಣ" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "WPA2 ಗೂಢಲಿಪೀಕರಣ" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "TKIP ಸಿಫರ್" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "CCMP ಸಿಫರ್" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" ವೈರ್ಲೆಸ್ ನಿಲುಕಣಾ ಬಿಂದುಗಳು %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = ಪ್ರಸಕ್ತ AP)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" ವೈರ್ಡ್ ಗುಣಧರ್ಮಗಳು\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "ವಾಹಕ(ಕ್ಯಾರಿಯರ್)" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "ಆನ್‌" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "ಆಫ್" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" IPV4 ಸಿದ್ಧತೆಗಳು:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "ವಿಳಾಸ" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "ಪ್ರಿಫಿಕ್ಸ್" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "ಗೇಟ್‌ವೇ" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "ಸಾಧನಗಳ ಸ್ಥಿತಿ" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "ದೋಷ: '%s' ಆರ್ಗ್ಯುಮೆಂಟ್ ಕಾಣಿಸುತ್ತಿಲ್ಲ." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "ದೋಷ: '%s' ಎಂಬ ಸಾಧನವು ಕಂಡು ಬಂದಿಲ್ಲ." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "ಯಶಸ್ಸು: '%s' ಎಂಬ ಸಾಧನದಿಂದ ಯಶಸ್ವಿಯಾಗಿ ಸಂಪರ್ಕವನ್ನು ಕಡಿದುಹಾಕಲಾಗಿದೆ." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "ದೋಷ: '%s' (%s) ಎಂಬ ಸಾಧನದ ಸಂಪರ್ಕವನ್ನು ಕಡಿದು ಹಾಕುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "ಸಾಧನದ ಸ್ಥಿತಿ: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "ದೋಷ: iface ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "WiFi ಸ್ಕ್ಯಾನ್ ಪಟ್ಟಿ" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "ದೋಷ: '%s' ಎಂಬುದು ಒಂದು WiFi ಸಾಧನವಾಗಿಲ್ಲ." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "ಸಾಧನ:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "ದೋಷ: hwaddr ಅನ್ನು ಸೂಚಿಸಬೇಕು." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "ದೋಷ: '%s' ಎಂಬ hwaddr ನ ನಿಲುಕಣಾ ಬಿಂದುವು ಕಾಣಿಸುತ್ತಿಲ್ಲ." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "AP ನಿಯತಾಂಕಗಳು" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "ಫ್ರೀಕ್ವೆನ್ಸಿ:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "ಕ್ರಮ:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "ತಾತ್ಕಾಲಿಕ" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "ಮೂಲಭೂತ ವ್ಯವಸ್ಥೆ" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "ಗರಿಷ್ಟ ಬಿಟ್ ದರ:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "ದೃಢತೆ:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "ಫ್ಲಾಗ್‌ಗಳು:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "ಗೌಪ್ಯತೆ" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "WPA ಫ್ಲಾಗ್‌ಗಳು:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "RSN ಫ್ಲಾಗ್‌ಗಳು:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'dev wifi' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'dev' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"ಬಳಕೆ: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "ನಿದ್ರಿಸುವ" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "ಸಂಪರ್ಕ ಕಲ್ಪಿಸಲಾಗುತ್ತಿದೆ" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "ಸಕ್ರಿಯಗೊಂಡ" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "ಅಶಕ್ತಗೊಂಡ" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "NetworkManager ಸ್ಥಿತಿ" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "NM ಚಾಲನೆಯಲ್ಲಿದೆ:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "ಚಾಲನೆಯಲ್ಲಿದೆ" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "ಚಾಲನೆಯಲ್ಲಿಲ್ಲ" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "NM ಸ್ಥಿತಿ:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "NM ವೈರ್ಲೆಸ್‌ ಯಂತ್ರಾಂಶ:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "NM ಯಂತ್ರಾಂಶ:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "NM WWAN ಯಂತ್ರಾಂಶ:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "NM WWAN:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "ದೋಷ: ಅಮಾನ್ಯವಾದ 'wifi' ನಿಯತಾಂಕ: '%s'." + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "ದೋಷ: ಅಮಾನ್ಯವಾದ 'wwan' ರ ನಿಯತಾಂಕ: '%s'." + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "ದೋಷ: '%s' ಎಂಬ 'nm' ಆಜ್ಞೆಯು ಮಾನ್ಯವಾದುದಲ್ಲ." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"ಬಳಕೆ: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "'%s' ಎಂಬ ವಸ್ತುವಿನ ಬಗೆಗೆ ತಿಳಿದಿಲ್ಲ, 'nmcli help' ಅನ್ನು ಪ್ರಯತ್ನಿಸಿ." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nmcli ಉಪಕರಣ, ಆವೃತ್ತಿ %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "'%s' ಎಂಬ ಆಯ್ಕೆಯ ಬಗೆಗೆ ತಿಳಿದಿಲ್ಲ, 'nmcli -help' ಅನ್ನು ಪ್ರಯತ್ನಿಸಿ." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "%d ಎಂಬ ಸಂಕೇತವು ಕಂಡುಬಂದಿದೆ, ಮುಚ್ಚಲಾಗುತ್ತಿದೆ......" + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "ದೋಷ: NetworkManager ನೊಂದಿಗೆ ಸಂಪರ್ಕಸಾಧಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "ಯಶಸ್ವಿಯಾಗಿದೆ" + #: ../libnm-util/crypto.c:120 #, c-format msgid "PEM key file had no end tag '%s'." @@ -106,7 +950,7 @@ msgstr "IV ಯು ಹೆಕ್ಸಾ-ದಶಮಾಂಶ ಅಲ್ಲದ ಅಂ #: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 #: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 -#: ../libnm-util/crypto_nss.c:335 +#: ../libnm-util/crypto_nss.c:336 #, c-format msgid "Private key cipher '%s' was unknown." msgstr "ಖಾಸಗಿ ಕೀಲಿ ಸಿಫರ್ '%s' ತಿಳಿದಿಲ್ಲ." @@ -165,43 +1009,38 @@ msgstr "ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲು IV ಅನ್ನು ಹೊ msgid "Failed to decrypt the private key: %s / %s." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." -#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:266 +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: unexpected padding length." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: ಅನಿರೀಕ್ಷಿತವಾದ ಪ್ಯಾಡಿಂಗ್ ಗಾತ್ರ" -#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:277 +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 #, c-format msgid "Failed to decrypt the private key." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:355 +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 #, c-format msgid "Could not allocate memory for encrypting." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಸಿಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." #: ../libnm-util/crypto_gnutls.c:294 #, c-format -#| msgid "Failed to initialize the decryption cipher context: %s / %s." msgid "Failed to initialize the encryption cipher context: %s / %s." msgstr "ಗೂಢಲಿಪೀಕರಣ ಸಿಫರ್ ಸಂದರ್ಭವನ್ನು ಆರಂಭಗೊಳಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." #: ../libnm-util/crypto_gnutls.c:303 #, c-format -#| msgid "Failed to set symmetric key for decryption: %s / %s." msgid "Failed to set symmetric key for encryption: %s / %s." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." #: ../libnm-util/crypto_gnutls.c:313 #, c-format -#| msgid "Failed to set IV for decryption: %s / %s." msgid "Failed to set IV for encryption: %s / %s." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು IV ಅನ್ನು ಹೊಂದಿಸಲು ವಿಫಲಗೊಂಡಿದೆ: %s / %s." #: ../libnm-util/crypto_gnutls.c:322 #, c-format -#| msgid "Failed to decrypt the private key: %s / %s." msgid "Failed to encrypt the data: %s / %s." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಗೂಢಲಿಪೀಕರಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %s / %s." @@ -230,7 +1069,7 @@ msgstr "PKCS#12 ಕಡತವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸ msgid "Couldn't verify PKCS#12 file: %s" msgstr "PKCS#12 ಕಡತವನ್ನು ಪರಿಶೀಲಿಸಲಾಗಿಲ್ಲ: %s" -#: ../libnm-util/crypto_nss.c:57 +#: ../libnm-util/crypto_nss.c:56 #, c-format msgid "Failed to initialize the crypto engine: %d." msgstr "ಕ್ರಿಪ್ಟೊ ಎಂಜಿನ್ ಅನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." @@ -272,7 +1111,6 @@ msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ #: ../libnm-util/crypto_nss.c:245 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to decrypt the private key: decrypted data too large." msgstr "" "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡಲಾದ ದತ್ತಾಂಶದ ಗಾತ್ರವು " @@ -283,151 +1121,149 @@ msgstr "" msgid "Failed to finalize decryption of the private key: %d." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಡೀಕ್ರಿಪ್ಟ್ ಮಾಡುವಿಕೆಯನ್ನು ಪೂರ್ಣಗೊಳಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." -#: ../libnm-util/crypto_nss.c:363 +#: ../libnm-util/crypto_nss.c:364 #, c-format -#| msgid "Failed to initialize the decryption cipher slot." msgid "Failed to initialize the encryption cipher slot." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲಾಗುವ ಸಿಫರ್ ಜಾಗವನ್ನು ಆರಂಭಿಸಲು ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:371 +#: ../libnm-util/crypto_nss.c:372 #, c-format -#| msgid "Failed to set symmetric key for decryption." msgid "Failed to set symmetric key for encryption." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಸಿಮಿಟ್ರಿಕ್ ಕೀಲಿಯನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:379 +#: ../libnm-util/crypto_nss.c:380 #, c-format -#| msgid "Failed to set IV for decryption." msgid "Failed to set IV for encryption." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು IV ಅನ್ನು ಹೊಂದಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:387 +#: ../libnm-util/crypto_nss.c:388 #, c-format -#| msgid "Failed to initialize the decryption context." msgid "Failed to initialize the encryption context." msgstr "ಗೂಢಲಿಪೀಕರಿಸುವ ಸನ್ನಿವೇಶವನ್ನು ಆರಂಭಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ." -#: ../libnm-util/crypto_nss.c:395 +#: ../libnm-util/crypto_nss.c:396 #, c-format -#| msgid "Failed to decrypt the private key: %d." msgid "Failed to encrypt: %d." msgstr "ಗೂಢಲಿಪೀಕರಿಸುವಲ್ಲಿ ವಿಫಲಗೊಂಡಿದೆ: %d." -#: ../libnm-util/crypto_nss.c:403 +#: ../libnm-util/crypto_nss.c:404 #, c-format msgid "Unexpected amount of data after encrypting." msgstr "ಗೂಢಲಿಪೀಕರಿಸಲು ಅನಿರೀಕ್ಷಿತವಾದ ದತ್ತಾಂಶದ ಮೊತ್ತ." -#: ../libnm-util/crypto_nss.c:446 +#: ../libnm-util/crypto_nss.c:447 #, c-format msgid "Couldn't decode certificate: %d" msgstr "ಪ್ರಮಾಣಪತ್ರವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:481 +#: ../libnm-util/crypto_nss.c:482 #, c-format msgid "Couldn't convert password to UCS2: %d" msgstr "ಗುಪ್ತಪದವನ್ನು UCS2 ಗೆ ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:509 +#: ../libnm-util/crypto_nss.c:510 #, c-format msgid "Couldn't initialize PKCS#12 decoder: %d" msgstr "PKCS#12 ಡೀಕೋಡರ್ ಅನ್ನು ಆರಂಭಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:518 +#: ../libnm-util/crypto_nss.c:519 #, c-format msgid "Couldn't decode PKCS#12 file: %d" msgstr "PKCS#12 ಕಡತವನ್ನು ಡೀಕೋಡ್ ಮಾಡಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:527 +#: ../libnm-util/crypto_nss.c:528 #, c-format msgid "Couldn't verify PKCS#12 file: %d" msgstr "PKCS#12 ಕಡತವನ್ನು ಖಚಿತಪಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %d" -#: ../libnm-util/crypto_nss.c:556 -#| msgid "Could not decode private key." +#: ../libnm-util/crypto_nss.c:557 msgid "Could not generate random data." msgstr "ಮನಸ್ಸಿಗೆ ಬಂದ ದತ್ತಾಂಶವನ್ನು ಉತ್ಪಾದಿಸಲಾಗಲಿಲ್ಲ." -#: ../libnm-util/nm-utils.c:1522 +#: ../libnm-util/nm-utils.c:1818 #, c-format -#| msgid "Not enough memory to decrypt private key." msgid "Not enough memory to make encryption key." msgstr "ಖಾಸಗಿ ಕೀಲಿಯನ್ನು ಗೂಢಲಿಪೀಕರಿಸಲು ಸಾಕಷ್ಟು ಮೆಮೊರಿ ಇಲ್ಲ." -#: ../libnm-util/nm-utils.c:1633 -#| msgid "Not enough memory to store PEM file data." +#: ../libnm-util/nm-utils.c:1928 msgid "Could not allocate memory for PEM file creation." msgstr "PEM ಕಡತ ರಚನೆಗೆ ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." -#: ../libnm-util/nm-utils.c:1645 +#: ../libnm-util/nm-utils.c:1940 #, c-format msgid "Could not allocate memory for writing IV to PEM file." msgstr "IV ಅನ್ನು PEM ಕಡತಕ್ಕೆ ಬರೆಯಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." -#: ../libnm-util/nm-utils.c:1657 +#: ../libnm-util/nm-utils.c:1952 #, c-format msgid "Could not allocate memory for writing encrypted key to PEM file." -msgstr "ಗೂಢಲಿಪೀಕರಿಸಲಾದ ಕೀಲಿಯನ್ನು PEM ಕಡತಕ್ಕೆ ಬರೆಯಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." +msgstr "" +"ಗೂಢಲಿಪೀಕರಿಸಲಾದ ಕೀಲಿಯನ್ನು PEM ಕಡತಕ್ಕೆ ಬರೆಯಲು ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." -#: ../libnm-util/nm-utils.c:1676 +#: ../libnm-util/nm-utils.c:1971 #, c-format -#| msgid "Not enough memory to store PEM file data." msgid "Could not allocate memory for PEM file data." msgstr "PEM ಕಡತ ದತ್ತಾಂಶಕ್ಕಾಗಿ ಮೆಮೊರಿಯನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ." -#: ../src/nm-netlink-monitor.c:194 ../src/nm-netlink-monitor.c:464 -#: ../src/nm-netlink-monitor.c:569 -#: ../src/ip6-manager/nm-netlink-listener.c:352 +#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:463 +#: ../src/nm-netlink-monitor.c:581 +#: ../src/ip6-manager/nm-netlink-listener.c:351 #, c-format msgid "error processing netlink message: %s" msgstr "ನೆಟ್‌ಲಿಂಕ್ ಸಂದೇಶವನ್ನು ಸಂಸ್ಕರಿಸುವಲ್ಲಿ ದೋಷ ಉಂಟಾಗಿದೆ: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:259 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "" "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಹ್ಯಾಂಡಲ್ ಅನ್ನು ನಿಯೋಜಿಸಲು " "ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:270 +#: ../src/nm-netlink-monitor.c:269 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "" "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್‌ನೊಂದಿಗೆ ಸಂಪರ್ಕ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %" "s" -#: ../src/nm-netlink-monitor.c:278 +#: ../src/nm-netlink-monitor.c:277 #, c-format msgid "unable to join netlink group for monitoring link status: %s" -msgstr "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" +msgstr "" +"ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:286 +#: ../src/nm-netlink-monitor.c:285 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" msgstr "" "ಕೊಂಡಿಯ ಸ್ಥಿತಿಯನ್ನು ಮೇಲ್ವಿಚಾರಣೆ ನಡೆಸಲು ನೆಟ್‌ಲಿಂಕ್ ಕೊಂಡಿ ಕ್ಯಾಶೆಯನ್ನು ನಿಯೋಜಿಸಲು " "ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/nm-netlink-monitor.c:494 -#: ../src/ip6-manager/nm-netlink-listener.c:382 +#: ../src/nm-netlink-monitor.c:493 +#: ../src/ip6-manager/nm-netlink-listener.c:381 msgid "error occurred while waiting for data on socket" msgstr "ಸಾಕೆಟ್‌ನಲ್ಲಿ ದತ್ತಾಂಶಕ್ಕಾಗಿ ಕಾಯುವಾಗ ದೋಷವು ಎದುರಾಗಿದೆ" -#: ../src/nm-netlink-monitor.c:558 +#: ../src/nm-netlink-monitor.c:557 ../src/nm-netlink-monitor.c:570 #, c-format msgid "error updating link cache: %s" msgstr "ಕೊಂಡಿ ಕ್ಯಾಶೆಯನ್ನು ಅಪ್‌ಡೇಟ್ ಮಾಡುವಾಗ ದೋಷ ಉಂಟಾಗಿದೆ: %s" -#: ../src/NetworkManager.c:330 +#: ../src/main.c:498 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" msgstr "ಅಮಾನ್ಯವಾದ ಆಯ್ಕೆ. ಮಾನ್ಯವಾದ ಆಯ್ಕೆಗಳಿಗಾಗಿ ದಯವಿಟ್ಟು --help ಅನ್ನು ನೋಡಿ.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:304 +#: ../src/main.c:558 +#, c-format +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. ಮಾನ್ಯವಾದ ಆಯ್ಕೆಗಳಿಗಾಗಿ ದಯವಿಟ್ಟು --help ಅನ್ನು ನೋಡಿ.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# NetworkManager ನಿಂದ ನಿರ್ಮಿಸಲಾಗಿದೆ\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:310 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -436,42 +1272,66 @@ msgstr "" "# %s ಇಂದ ಒಗ್ಗೂಡಿಸಲಾಗಿದೆ\n" "\n" -#: ../src/ip6-manager/nm-netlink-listener.c:200 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "ಬಳಸಬಹುದಾದ ಯಾವುದೆ DHCP ಕ್ಲೈಂಟ್ ಕಂಡುಬಂದಿಲ್ಲ." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "'dhclient' ಕಂಡು ಬಂದಿದೆ." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "'dhcpcd' ಕಂಡು ಬಂದಿದೆ." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "ಬೆಂಬಲವಿರದ DHCP ಕ್ಲೈಂಟ್ '%s'" + +#: ../src/ip6-manager/nm-netlink-listener.c:199 #, c-format -#| msgid "unable to allocate netlink handle for monitoring link status: %s" msgid "unable to allocate netlink handle: %s" msgstr "ನೆಟ್‌ಲಿಂಕ್ ಹ್ಯಾಂಡಲ್ ಅನ್ನು ನಿಯೋಜಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:210 +#: ../src/ip6-manager/nm-netlink-listener.c:209 #, c-format -#| msgid "unable to connect to netlink for monitoring link status: %s" msgid "unable to connect to netlink: %s" msgstr "ನೆಟ್‌ಲಿಂಕ್‌ನೊಂದಿಗೆ ಸಂಪರ್ಕ ಜೋಡಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/ip6-manager/nm-netlink-listener.c:307 +#: ../src/ip6-manager/nm-netlink-listener.c:306 #, c-format -#| msgid "unable to join netlink group for monitoring link status: %s" msgid "unable to join netlink group: %s" msgstr "ನೆಟ್‌ಲಿಂಕ್ ಗುಂಪನ್ನು ಸೇರಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ: %s" -#: ../src/named-manager/nm-named-manager.c:315 +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "ಗೊತ್ತಿರದ ದಾಖಲೆ ಮಟ್ಟ '%s'" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "ಗೊತ್ತಿರದ ದಾಖಲೆ ಡೊಮೈನ್ '%s'" + +#: ../src/named-manager/nm-named-manager.c:314 msgid "NOTE: the libc resolver may not support more than 3 nameservers." msgstr "" "ಸೂಚನೆ: libc ಪರಿಹಾರಕವು(ರಿಸಾಲ್ವರ್) ೩ ನಾಮಪರಿಚಾರಕಗಳಿಗಿಂತ ಹೆಚ್ಚಿನವುಗಳನ್ನು " "ಬೆಂಬಲಿಸುವುದಿಲ್ಲ." -#: ../src/named-manager/nm-named-manager.c:317 +#: ../src/named-manager/nm-named-manager.c:316 msgid "The nameservers listed below may not be recognized." msgstr "ಈ ಕೆಳಗೆ ಸೂಚಿಸಲಾದ ನಾಮಪರಿಚಾರಕಗಳನ್ನು ಗುರುತಿಸಲಾಗಿಲ್ಲ." -#: ../src/system-settings/nm-default-wired-connection.c:194 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" msgstr "ಸ್ವಯಂ %s" -#: ../system-settings/plugins/ifcfg-rh/reader.c:2406 +#: ../system-settings/plugins/ifcfg-rh/reader.c:3229 msgid "System" -msgstr "ಗಣಕ" +msgstr "ವ್ಯವಸ್ಥೆ" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 msgid "Connection sharing via a protected WiFi network" @@ -494,15 +1354,15 @@ msgid "System policy prevents modification of system settings" msgstr "ವ್ಯವಸ್ಥೆಯ ಸಂಪರ್ಕಗಳನ್ನು ಮಾರ್ಪಡಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತಿವೆ" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 -#| msgid "System policy prevents modification of system settings" msgid "System policy prevents modification of the persistent system hostname" msgstr "ಸ್ಥಿರ ವ್ಯವಸ್ಥೆಯ ಆತಿಥೇಯ ಹೆಸರನ್ನು ಮಾರ್ಪಡಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 msgid "System policy prevents sharing connections via a protected WiFi network" -msgstr "ಒಂದು ಸಂರಕ್ಷಿತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" +msgstr "" +"ಒಂದು ಸಂರಕ್ಷಿತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" #: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 msgid "System policy prevents sharing connections via an open WiFi network" -msgstr "ಒಂದು ಮುಕ್ತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" - +msgstr "" +"ಒಂದು ಮುಕ್ತವಾದ WiFi ಜಾಲಬಂಧದ ಮೂಲಕ ಸಂಪರ್ಕ ಸಾಧಿಸದಂತೆ ವ್ಯವಸ್ಥೆಯ ನಿಯಮಗಳು ತಡೆಯುತ್ತವೆ" From a7ab278498a4f67b8c57bd1a275ddc020baf36f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=8Cernock=C3=BD?= Date: Sat, 24 Apr 2010 00:15:40 -0700 Subject: [PATCH 103/105] po: update Czech translation (bgo #616630) --- po/cs.po | 1525 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 1319 insertions(+), 206 deletions(-) diff --git a/po/cs.po b/po/cs.po index ed0ac8c904..1be6b82e1a 100644 --- a/po/cs.po +++ b/po/cs.po @@ -5,66 +5,1283 @@ # Miloslav Trmac , 2004 - 2006. # Jakub Friedl , 2006. # Jiří Eischmann , 2008. -# +# Marek Černocký , 2010. msgid "" msgstr "" "Project-Id-Version: NetworkManager\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-09-17 22:27+0200\n" -"PO-Revision-Date: 2008-09-17 22:08+0200\n" -"Last-Translator: Petr Kovar \n" +"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" +"product=NetworkManager&component=general\n" +"POT-Creation-Date: 2010-04-09 03:24+0000\n" +"PO-Revision-Date: 2010-04-23 13:02+0200\n" +"Last-Translator: Marek Černocký \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ../src/nm-netlink-monitor.c:193 ../src/nm-netlink-monitor.c:474 +#: ../cli/src/connections.c:86 +#, c-format +msgid "" +"Usage: nmcli con { COMMAND | help }\n" +" COMMAND := { list | status | up | down }\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--timeout " +"]\n" +" down id | uuid \n" +msgstr "" +"Použití: nmcli con {PŘÍKAZ | help}\n" +" PŘÍKAZ := {list | status | up | down}\n" +"\n" +" list [id | uuid | system | user]\n" +" status\n" +" up id | uuid [iface ] [ap ] [--nowait] [--" +"timeout <časový_limit>]\n" +" down id | uuid \n" + +#: ../cli/src/connections.c:158 +msgid "Connections" +msgstr "Připojení" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/devices.c:298 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Type" +msgstr "Typ" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "UUID" +msgstr "UUID" + +#: ../cli/src/connections.c:158 ../cli/src/connections.c:160 +#: ../cli/src/connections.c:196 ../cli/src/connections.c:198 +#: ../cli/src/connections.c:205 ../cli/src/connections.c:207 +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Name" +msgstr "Název" + +#: ../cli/src/connections.c:163 +#, c-format +msgid "System connections:\n" +msgstr "Systémová připojení:\n" + +#: ../cli/src/connections.c:167 +#, c-format +msgid "User connections:\n" +msgstr "Uživatelská připojení:\n" + +#: ../cli/src/connections.c:178 ../cli/src/connections.c:967 +#: ../cli/src/connections.c:983 ../cli/src/connections.c:992 +#: ../cli/src/connections.c:1003 ../cli/src/connections.c:1085 +#: ../cli/src/devices.c:604 ../cli/src/devices.c:614 ../cli/src/devices.c:699 +#: ../cli/src/devices.c:785 ../cli/src/devices.c:792 +#, c-format +msgid "Error: %s argument is missing." +msgstr "Chyba: schází argument %s." + +#: ../cli/src/connections.c:189 +#, c-format +msgid "Error: %s - no such connection." +msgstr "Chyba: %s - takové připojení neexistuje." + +#: ../cli/src/connections.c:196 +msgid "System-wide connections" +msgstr "Připojení v rámci systému" + +#: ../cli/src/connections.c:205 +msgid "User connections" +msgstr "Uživatelská připojení" + +#: ../cli/src/connections.c:212 ../cli/src/connections.c:1016 +#: ../cli/src/connections.c:1103 ../cli/src/devices.c:446 +#: ../cli/src/devices.c:494 ../cli/src/devices.c:628 ../cli/src/devices.c:706 +#: ../cli/src/devices.c:798 +#, c-format +msgid "Unknown parameter: %s\n" +msgstr "Neznámý parametr: %s\n" + +#: ../cli/src/connections.c:221 +#, c-format +msgid "Error: no valid parameter specified." +msgstr "Chyba: nezadán žádný platný parametr." + +#. FIXME: Fix the output +#: ../cli/src/connections.c:268 ../cli/src/devices.c:302 +#: ../cli/src/devices.c:321 ../cli/src/devices.c:353 ../cli/src/devices.c:355 +#: ../cli/src/devices.c:357 ../cli/src/devices.c:359 ../cli/src/devices.c:361 +msgid "yes" +msgstr "ano" + +#: ../cli/src/connections.c:268 ../cli/src/devices.c:304 +msgid "no" +msgstr "ne" + +#: ../cli/src/connections.c:297 +msgid "Active connections" +msgstr "Aktivní připojení" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +#: ../cli/src/devices.c:302 ../cli/src/devices.c:304 +msgid "Default" +msgstr "Výchozí" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Service" +msgstr "Služba" + +#: ../cli/src/connections.c:297 ../cli/src/connections.c:299 +msgid "Devices" +msgstr "Zařízení" + +#: ../cli/src/connections.c:659 +#, c-format +msgid "no active connection on device '%s'" +msgstr "žádné aktivní připojení nebo zařízení „%s“" + +#: ../cli/src/connections.c:667 +#, c-format +msgid "no active connection or device" +msgstr "žádné aktivní připojení nebo zařízení" + +#: ../cli/src/connections.c:730 +msgid "activating" +msgstr "aktivuje se" + +#: ../cli/src/connections.c:732 +msgid "activated" +msgstr "aktivováno" + +#: ../cli/src/connections.c:735 ../cli/src/connections.c:758 +#: ../cli/src/connections.c:791 ../cli/src/devices.c:111 +#: ../cli/src/network-manager.c:76 ../cli/src/network-manager.c:98 +msgid "unknown" +msgstr "neznámo" + +#: ../cli/src/connections.c:744 +msgid "VPN connecting (prepare)" +msgstr "VPN se připojuje (příprava)" + +#: ../cli/src/connections.c:746 +msgid "VPN connecting (need authentication)" +msgstr "VPN se připojuje (požaduje ověření)" + +#: ../cli/src/connections.c:748 +msgid "VPN connecting" +msgstr "VPN se připojuje" + +#: ../cli/src/connections.c:750 +msgid "VPN connecting (getting IP configuration)" +msgstr "VPN se připojuje (získává se nastavení IP)" + +#: ../cli/src/connections.c:752 +msgid "VPN connected" +msgstr "VPN připojena" + +#: ../cli/src/connections.c:754 +msgid "VPN connection failed" +msgstr "VPN se nezdařilo připojit" + +#: ../cli/src/connections.c:756 +msgid "VPN disconnected" +msgstr "VPN odpojena" + +#: ../cli/src/connections.c:767 +msgid "unknown reason" +msgstr "neznámý důvod" + +#: ../cli/src/connections.c:769 +msgid "none" +msgstr "žádný" + +#: ../cli/src/connections.c:771 +msgid "the user was disconnected" +msgstr "uživatel byl odpojen" + +#: ../cli/src/connections.c:773 +msgid "the base network connection was interrupted" +msgstr "základní síťové připojení bylo přerušeno" + +#: ../cli/src/connections.c:775 +msgid "the VPN service stopped unexpectedly" +msgstr "služba VPN neočekávaně zastavena" + +#: ../cli/src/connections.c:777 +msgid "the VPN service returned invalid configuration" +msgstr "služba VPN vrátila neplatné nastavení" + +#: ../cli/src/connections.c:779 +msgid "the connection attempt timed out" +msgstr "pokusu o připojení vypršel časový limit" + +#: ../cli/src/connections.c:781 +msgid "the VPN service did not start in time" +msgstr "služba VPN se nespustila v časovém limitu" + +#: ../cli/src/connections.c:783 +msgid "the VPN service failed to start" +msgstr "službu VPN se nezdařilo spustit" + +#: ../cli/src/connections.c:785 +msgid "no valid VPN secrets" +msgstr "žádná platná utajení VPN" + +#: ../cli/src/connections.c:787 +msgid "invalid VPN secrets" +msgstr "neplatná utajení VPN" + +#: ../cli/src/connections.c:789 +msgid "the connection was removed" +msgstr "připojení odstraněno" + +#: ../cli/src/connections.c:803 +#, c-format +msgid "state: %s\n" +msgstr "stav: %s\n" + +#: ../cli/src/connections.c:806 ../cli/src/connections.c:832 +#, c-format +msgid "Connection activated\n" +msgstr "Připojení aktivováno\n" + +#: ../cli/src/connections.c:809 +#, c-format +msgid "Error: Connection activation failed." +msgstr "Chyba: Selhala aktivace připojení." + +#: ../cli/src/connections.c:828 +#, c-format +msgid "state: %s (%d)\n" +msgstr "stav: %s (%d)\n" + +#: ../cli/src/connections.c:838 +#, c-format +msgid "Error: Connection activation failed: %s." +msgstr "Chyba: Selhala aktivace připojení: %s" + +#: ../cli/src/connections.c:855 ../cli/src/devices.c:551 +#, c-format +msgid "Error: Timeout %d sec expired." +msgstr "Chyba: Časový limit %d sekund vypršel." + +#: ../cli/src/connections.c:898 +#, c-format +msgid "Error: Connection activation failed: %s" +msgstr "Chyba: Selhala aktivace připojení: %s" + +#: ../cli/src/connections.c:912 +#, c-format +msgid "Error: Obtaining active connection for '%s' failed." +msgstr "Chyba: Získání aktivního připojení pro „%s“ selhalo." + +#: ../cli/src/connections.c:921 +#, c-format +msgid "Active connection state: %s\n" +msgstr "Stav aktivního připojení: %s\n" + +#: ../cli/src/connections.c:922 +#, c-format +msgid "Active connection path: %s\n" +msgstr "Cesta aktivního připojení: %s\n" + +#: ../cli/src/connections.c:976 ../cli/src/connections.c:1094 +#, c-format +msgid "Error: Unknown connection: %s." +msgstr "Chyba: Neznámé připojení: %s." + +#: ../cli/src/connections.c:1011 ../cli/src/devices.c:622 +#, c-format +msgid "Error: timeout value '%s' is not valid." +msgstr "Chyba: hodnota časového limitu „%s“ není platná." + +#: ../cli/src/connections.c:1024 ../cli/src/connections.c:1111 +#, c-format +msgid "Error: id or uuid has to be specified." +msgstr "Chyba: nebylo určeno id nebo uuid." + +#: ../cli/src/connections.c:1044 +#, c-format +msgid "Error: No suitable device found: %s." +msgstr "Chyba: Nenalezeno vhodné zařízení: %s." + +#: ../cli/src/connections.c:1046 +#, c-format +msgid "Error: No suitable device found." +msgstr "Chyba: Nenalezeno vhodné zařízení." + +#: ../cli/src/connections.c:1138 +#, c-format +msgid "Warning: Connection not active\n" +msgstr "Varování: Připojení není aktivní\n" + +#: ../cli/src/connections.c:1189 +#, c-format +msgid "Error: 'con' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „con“ platný." + +#: ../cli/src/connections.c:1216 +#, c-format +msgid "Error: could not connect to D-Bus." +msgstr "Chyba: nelze se připojit ke sběrnici D-Bus." + +#: ../cli/src/connections.c:1223 +#, c-format +msgid "Error: Could not get system settings." +msgstr "Chyba: Nelze získat systémová nastavení." + +#: ../cli/src/connections.c:1231 +#, c-format +msgid "Error: Could not get user settings." +msgstr "Chyba: Nelze získat uživatelská nastavení." + +#: ../cli/src/connections.c:1241 +#, c-format +msgid "Error: Can't obtain connections: settings services are not running." +msgstr "Chyba: Nelze získat připojení: služba správy nastavení neběží." + +#: ../cli/src/devices.c:73 +#, c-format +msgid "" +"Usage: nmcli dev { COMMAND | help }\n" +"\n" +" COMMAND := { status | list | disconnect | wifi }\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout ]\n" +" wifi [list [iface ] | apinfo iface hwaddr ]\n" +"\n" +msgstr "" +"Použití: nmcli dev {PŘÍKAZ | help}\n" +"\n" +" PŘÍKAZ := {status | list | disconnect | wifi}\n" +"\n" +" status\n" +" list [iface ]\n" +" disconnect iface [--nowait] [--timeout <časový_limit>]\n" +" wifi [list [iface ] | apinfo iface hwaddr " +"]\n" +"\n" + +#: ../cli/src/devices.c:93 +msgid "unmanaged" +msgstr "není pod správou" + +#: ../cli/src/devices.c:95 +msgid "unavailable" +msgstr "nedostupné" + +#: ../cli/src/devices.c:97 ../cli/src/network-manager.c:73 +msgid "disconnected" +msgstr "odpojeno" + +#: ../cli/src/devices.c:99 +msgid "connecting (prepare)" +msgstr "připojuje se (příprava)" + +#: ../cli/src/devices.c:101 +msgid "connecting (configuring)" +msgstr "připojuje se (nastavování)" + +#: ../cli/src/devices.c:103 +msgid "connecting (need authentication)" +msgstr "připojuje se (požadováno ověření)" + +#: ../cli/src/devices.c:105 +msgid "connecting (getting IP configuration)" +msgstr "připojuje se (získává se nastavení IP)" + +#: ../cli/src/devices.c:107 ../cli/src/network-manager.c:71 +msgid "connected" +msgstr "připojeno" + +#: ../cli/src/devices.c:109 +msgid "connection failed" +msgstr "připojení se nezdařilo" + +#: ../cli/src/devices.c:132 ../cli/src/devices.c:876 +msgid "Unknown" +msgstr "Neznámý" + +#. print them +#: ../cli/src/devices.c:164 ../cli/src/devices.c:266 ../cli/src/devices.c:861 +#: ../cli/src/devices.c:879 +msgid "(none)" +msgstr "(nic)" + +#: ../cli/src/devices.c:209 +#, c-format +msgid "%s: error converting IP4 address 0x%X" +msgstr "%s: chyba převodu adresy IP4 0x%X" + +#: ../cli/src/devices.c:238 +#, c-format +msgid "%s, %s, Freq %d MHz, Rate %d Mb/s, Strength %d" +msgstr "%s, %s, Frekv %d MHz, Rychlost %d Mb/s, Síla sig %d" + +#: ../cli/src/devices.c:239 +msgid "Ad-Hoc" +msgstr "Ad-Hoc" + +#: ../cli/src/devices.c:248 +msgid ", Encrypted: " +msgstr ", Šifrováno: " + +#: ../cli/src/devices.c:253 +msgid " WEP" +msgstr " WEP" + +#: ../cli/src/devices.c:255 +msgid " WPA" +msgstr " WPA" + +#: ../cli/src/devices.c:257 +msgid " WPA2" +msgstr " WPA2" + +#: ../cli/src/devices.c:260 +msgid " Enterprise" +msgstr " Podnikové" + +#: ../cli/src/devices.c:294 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "Device" +msgstr "Zařízení" + +#: ../cli/src/devices.c:299 +msgid "Driver" +msgstr "Ovladač" + +#: ../cli/src/devices.c:299 ../cli/src/devices.c:567 +msgid "(unknown)" +msgstr "(neznámo)" + +#: ../cli/src/devices.c:300 ../cli/src/devices.c:458 ../cli/src/devices.c:460 +msgid "State" +msgstr "Stav" + +#: ../cli/src/devices.c:313 +msgid "HW Address" +msgstr "HW adresa" + +#: ../cli/src/devices.c:319 +#, c-format +msgid "" +"\n" +" Capabilities:\n" +msgstr "" +"\n" +" Schopnosti:\n" + +#: ../cli/src/devices.c:321 +msgid "Carrier Detect" +msgstr "Detekce nosného signálu" + +#: ../cli/src/devices.c:336 +#, c-format +msgid "%u Mb/s" +msgstr "%u Mb/s" + +#: ../cli/src/devices.c:337 +msgid "Speed" +msgstr "Rychlost" + +#: ../cli/src/devices.c:348 +#, c-format +msgid "" +"\n" +" Wireless Properties\n" +msgstr "" +"\n" +" Vlastnosti bezdrátové části\n" + +#: ../cli/src/devices.c:353 +msgid "WEP Encryption" +msgstr "Šifrování WEP" + +#: ../cli/src/devices.c:355 +msgid "WPA Encryption" +msgstr "Šifrování WPA" + +#: ../cli/src/devices.c:357 +msgid "WPA2 Encryption" +msgstr "Šifrování WPA2" + +#: ../cli/src/devices.c:359 +msgid "TKIP cipher" +msgstr "Šifra TKIP" + +#: ../cli/src/devices.c:361 +msgid "CCMP cipher" +msgstr "Šifra CCMP" + +#: ../cli/src/devices.c:368 +#, c-format +msgid "" +"\n" +" Wireless Access Points %s\n" +msgstr "" +"\n" +" Bezdrátový přístupový bod %s\n" + +#: ../cli/src/devices.c:368 +msgid "(* = current AP)" +msgstr "(* = aktuální přístupový bod)" + +#: ../cli/src/devices.c:374 +#, c-format +msgid "" +"\n" +" Wired Properties\n" +msgstr "" +"\n" +" Vlastnosti drátové části\n" + +#: ../cli/src/devices.c:377 ../cli/src/devices.c:379 +msgid "Carrier" +msgstr "Nosný signál" + +#: ../cli/src/devices.c:377 +msgid "on" +msgstr "zapnut" + +#: ../cli/src/devices.c:379 +msgid "off" +msgstr "vypnut" + +#: ../cli/src/devices.c:387 +#, c-format +msgid "" +"\n" +" IPv4 Settings:\n" +msgstr "" +"\n" +" Nastavení IPv4:\n" + +#: ../cli/src/devices.c:395 +msgid "Address" +msgstr "Adresa" + +#: ../cli/src/devices.c:401 +msgid "Prefix" +msgstr "Předčíslí" + +#: ../cli/src/devices.c:405 +msgid "Gateway" +msgstr "Brána" + +#: ../cli/src/devices.c:416 +msgid "DNS" +msgstr "DNS" + +#: ../cli/src/devices.c:458 +msgid "Status of devices" +msgstr "Stav zařízení" + +#: ../cli/src/devices.c:487 +#, c-format +msgid "Error: '%s' argument is missing." +msgstr "Chyba: schází argument „%s“." + +#: ../cli/src/devices.c:516 ../cli/src/devices.c:655 ../cli/src/devices.c:729 +#, c-format +msgid "Error: Device '%s' not found." +msgstr "Chyba: Zařízení „%s“ nenalezeno." + +#: ../cli/src/devices.c:539 +#, c-format +msgid "Success: Device '%s' successfully disconnected." +msgstr "Úspěch: Zařízení „%s“ úspěšně odpojeno." + +#: ../cli/src/devices.c:564 +#, c-format +msgid "Error: Device '%s' (%s) disconnecting failed: %s" +msgstr "Chyba: Odpojení zařízení „%s“ (%s) selhalo: %s" + +#: ../cli/src/devices.c:572 +#, c-format +msgid "Device state: %d (%s)\n" +msgstr "Stav zařízení: %d (%s)\n" + +#: ../cli/src/devices.c:636 +#, c-format +msgid "Error: iface has to be specified." +msgstr "Chyba: nebylo určeno rozhraní." + +#: ../cli/src/devices.c:736 ../cli/src/devices.c:746 +msgid "WiFi scan list" +msgstr "Seznam prohledání WiFi" + +#: ../cli/src/devices.c:740 +#, c-format +msgid "Error: Device '%s' is not a WiFi device." +msgstr "Chyba: Zařízení „%s“ není zařízení WiFi." + +#: ../cli/src/devices.c:754 +msgid "Device:" +msgstr "Zařízení:" + +#: ../cli/src/devices.c:806 +#, c-format +msgid "Error: hwaddr has to be specified." +msgstr "Chyba: musí být určena hardwarová adresa." + +#: ../cli/src/devices.c:844 +#, c-format +msgid "Error: Access point with hwaddr '%s' not found." +msgstr "Chyba: Přístupový bod s hardwarovou adresou „%s“ nenalezen." + +#: ../cli/src/devices.c:862 +#, c-format +msgid "%u MHz" +msgstr "%u MHz" + +#: ../cli/src/devices.c:863 +#, c-format +msgid "%u MB/s" +msgstr "%u MB/s" + +#: ../cli/src/devices.c:869 ../cli/src/devices.c:871 +msgid "AP parameters" +msgstr "Parametry přístupového bodu" + +#: ../cli/src/devices.c:873 +msgid "SSID:" +msgstr "SSID:" + +#: ../cli/src/devices.c:874 +msgid "BSSID:" +msgstr "BSSID:" + +#: ../cli/src/devices.c:875 +msgid "Frequency:" +msgstr "Kmitočet:" + +#: ../cli/src/devices.c:876 +msgid "Mode:" +msgstr "Režim:" + +#: ../cli/src/devices.c:876 +msgid "Ad-hoc" +msgstr "Ad-hoc" + +#: ../cli/src/devices.c:876 +msgid "Infrastructure" +msgstr "Infrastruktura" + +#: ../cli/src/devices.c:877 +msgid "Maximal bitrate:" +msgstr "Max. přenosová rychlost:" + +#: ../cli/src/devices.c:878 +msgid "Strength:" +msgstr "Síla signálu:" + +#: ../cli/src/devices.c:879 +msgid "Flags:" +msgstr "Příznaky:" + +#: ../cli/src/devices.c:879 +msgid "privacy" +msgstr "soukromé" + +#: ../cli/src/devices.c:880 +msgid "WPA flags:" +msgstr "Příznaky WPA:" + +#: ../cli/src/devices.c:881 +msgid "RSN flags:" +msgstr "Příznaky RSN:" + +#: ../cli/src/devices.c:907 +#, c-format +msgid "Error: 'dev wifi' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „dev wifi“ platný." + +#: ../cli/src/devices.c:943 +#, c-format +msgid "Error: 'dev' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „dev“ platný." + +#: ../cli/src/network-manager.c:46 +#, c-format +msgid "" +"Usage: nmcli nm { COMMAND | help }\n" +"\n" +" COMMAND := { status | sleep | wakeup | wifi | wwan }\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" +msgstr "" +"Použití: nmcli nm {PŘÍKAZ | help}\n" +"\n" +" PŘÍKAZ := {status | sleep | wakeup | wifi | wwan}\n" +"\n" +" status\n" +" sleep\n" +" wakeup\n" +" wifi [on|off]\n" +" wwan [on|off]\n" +"\n" + +#: ../cli/src/network-manager.c:67 +msgid "asleep" +msgstr "uspán" + +#: ../cli/src/network-manager.c:69 +msgid "connecting" +msgstr "připojuje se" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "enabled" +msgstr "povoleno" + +#: ../cli/src/network-manager.c:93 ../cli/src/network-manager.c:94 +#: ../cli/src/network-manager.c:95 ../cli/src/network-manager.c:96 +#: ../cli/src/network-manager.c:143 ../cli/src/network-manager.c:160 +msgid "disabled" +msgstr "zakázáno" + +#: ../cli/src/network-manager.c:102 +msgid "NetworkManager status" +msgstr "Stav správce sítě NetworkManager" + +#: ../cli/src/network-manager.c:104 +msgid "NM running:" +msgstr "Běh NM:" + +#: ../cli/src/network-manager.c:104 +msgid "running" +msgstr "běží" + +#: ../cli/src/network-manager.c:104 +msgid "not running" +msgstr "neběží" + +#: ../cli/src/network-manager.c:105 +msgid "NM state:" +msgstr "Stav NM:" + +#: ../cli/src/network-manager.c:106 +msgid "NM wireless hardware:" +msgstr "Bezdrátový hardware NM:" + +#. no argument, show current state +#: ../cli/src/network-manager.c:107 ../cli/src/network-manager.c:143 +msgid "NM wireless:" +msgstr "Bezdrátové sítě NM:" + +#: ../cli/src/network-manager.c:108 +msgid "NM WWAN hardware:" +msgstr "Hardware WWAN NM" + +#. no argument, show current state +#: ../cli/src/network-manager.c:109 ../cli/src/network-manager.c:160 +msgid "NM WWAN:" +msgstr "Sítě WWAN NM:" + +#: ../cli/src/network-manager.c:150 +#, c-format +msgid "Error: invalid 'wifi' parameter: '%s'." +msgstr "Chyba: neplatný parametr pro „wifi“: „%s“" + +#: ../cli/src/network-manager.c:167 +#, c-format +msgid "Error: invalid 'wwan' parameter: '%s'." +msgstr "Chyba: neplatný parametr pro „wwan“: „%s“" + +#: ../cli/src/network-manager.c:178 +#, c-format +msgid "Error: 'nm' command '%s' is not valid." +msgstr "Chyba: příkaz „%s“ není pro „nm“ platný." + +#: ../cli/src/nmcli.c:65 +#, c-format +msgid "" +"Usage: %s [OPTIONS] OBJECT { COMMAND | help }\n" +"\n" +"OPTIONS\n" +" -t[erse] terse output\n" +" -p[retty] pretty output\n" +" -v[ersion] show program version\n" +" -h[elp] print this help\n" +"\n" +"OBJECT\n" +" nm NetworkManager status\n" +" con NetworkManager connections\n" +" dev devices managed by NetworkManager\n" +"\n" +msgstr "" +"Použití: %s [PŘEPÍNAČE] OBJEKT {PŘÍKAZ | help}\n" +"\n" +"PŘEPÍNAČE\n" +" -t[erse] stručný výpis\n" +" -p[retty] hezký výpis\n" +" -v[ersion] zobrazit verzi programu\n" +" -h[elp] zobrazit tuto nápovědu\n" +"\n" +"OBJEKT\n" +" nm stav NetworkManageru\n" +" con připojení v NetworkManageru\n" +" dev zařízení spravovaná NetworkManagerem\n" +"\n" + +#: ../cli/src/nmcli.c:106 +#, c-format +msgid "Object '%s' is unknown, try 'nmcli help'." +msgstr "Objekt „%s“ je neznámý, zkuste „nmcli help“." + +#: ../cli/src/nmcli.c:139 +#, c-format +msgid "nmcli tool, version %s\n" +msgstr "nástroj nmcli, verze %s\n" + +#: ../cli/src/nmcli.c:145 +#, c-format +msgid "Option '%s' is unknown, try 'nmcli -help'." +msgstr "Přepínač „%s“ je neznámý, zkuste „nmcli -help“." + +#: ../cli/src/nmcli.c:164 +#, c-format +msgid "Caught signal %d, shutting down..." +msgstr "Zachycen signál %d, vypíná se…" + +#: ../cli/src/nmcli.c:189 +#, c-format +msgid "Error: Could not connect to NetworkManager." +msgstr "Chyba: Nelze se připojit ke správci sítě NetworkManager." + +#: ../cli/src/nmcli.c:205 +msgid "Success" +msgstr "Úspěch" + +#: ../libnm-util/crypto.c:120 +#, c-format +msgid "PEM key file had no end tag '%s'." +msgstr "Soubor klíče PEM neměl koncovou značku „%s“." + +#: ../libnm-util/crypto.c:130 +#, c-format +msgid "Doesn't look like a PEM private key file." +msgstr "Nevypadá jako soubor soukromého klíče PEM." + +#: ../libnm-util/crypto.c:138 +#, c-format +msgid "Not enough memory to store PEM file data." +msgstr "Není dostatek paměti pro uložení dat souboru PEM." + +#: ../libnm-util/crypto.c:154 +#, c-format +msgid "Malformed PEM file: Proc-Type was not first tag." +msgstr "Vadný soubor PEM: značka Proc-Type nebyla první značkou." + +#: ../libnm-util/crypto.c:162 +#, c-format +msgid "Malformed PEM file: unknown Proc-Type tag '%s'." +msgstr "Vadný soubor PEM: neznámá značka Proc-Type „%s“." + +#: ../libnm-util/crypto.c:172 +#, c-format +msgid "Malformed PEM file: DEK-Info was not the second tag." +msgstr "Vadný soubor PEM: značka DEK-Info nebyla druhou značkou." + +#: ../libnm-util/crypto.c:183 +#, c-format +msgid "Malformed PEM file: no IV found in DEK-Info tag." +msgstr "Vadný soubor PEM: nebyl nalezen IV ve značce DEK-Info." + +#: ../libnm-util/crypto.c:190 +#, c-format +msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." +msgstr "Vadný soubor PEM: neplatný formát IV ve značce DEK-Info." + +#: ../libnm-util/crypto.c:203 +#, c-format +msgid "Malformed PEM file: unknown private key cipher '%s'." +msgstr "Vadný soubor PEM: neznámá šifra soukromého klíče „%s“." + +#: ../libnm-util/crypto.c:222 +#, c-format +msgid "Could not decode private key." +msgstr "Nelze dekódovat soukromý klíč." + +#: ../libnm-util/crypto.c:267 +#, c-format +msgid "PEM certificate '%s' had no end tag '%s'." +msgstr "Certifikát PEM „%s“ nemá koncovou značku „%s“." + +#: ../libnm-util/crypto.c:277 +#, c-format +msgid "Failed to decode certificate." +msgstr "Selhalo dekódování certifikátu." + +#: ../libnm-util/crypto.c:286 +#, c-format +msgid "Not enough memory to store certificate data." +msgstr "Nedostatek paměti pro uložení dat certifikátu." + +#: ../libnm-util/crypto.c:294 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Not enough memory to store file data." +msgstr "Nedostatek paměti na uložení dat souboru." + +#: ../libnm-util/crypto.c:324 +#, c-format +msgid "IV must be an even number of bytes in length." +msgstr "IV musí mít na délku sudý počet bajtů." + +#: ../libnm-util/crypto.c:333 +#, c-format +msgid "Not enough memory to store the IV." +msgstr "Nedostatek paměti pro uložení IV." + +#: ../libnm-util/crypto.c:344 +#, c-format +msgid "IV contains non-hexadecimal digits." +msgstr "IV obsahuje jiné než šestnáctkové číslice." + +#: ../libnm-util/crypto.c:382 ../libnm-util/crypto_gnutls.c:148 +#: ../libnm-util/crypto_gnutls.c:266 ../libnm-util/crypto_nss.c:171 +#: ../libnm-util/crypto_nss.c:336 +#, c-format +msgid "Private key cipher '%s' was unknown." +msgstr "Šifra soukromého klíče „%s“ je neznámá." + +#: ../libnm-util/crypto.c:391 +#, c-format +#| msgid "Not enough memory to store decrypted private key." +msgid "Not enough memory to decrypt private key." +msgstr "Nedostatek paměti pro dešifrování soukromého klíče." + +#: ../libnm-util/crypto.c:511 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Unable to determine private key type." +msgstr "Nelze určit typ soukromého klíče." + +#: ../libnm-util/crypto.c:530 +#, c-format +msgid "Not enough memory to store decrypted private key." +msgstr "Nedostatek paměti pro uložení dešifrovaného soukromého klíče." + +#: ../libnm-util/crypto_gnutls.c:49 +msgid "Failed to initialize the crypto engine." +msgstr "Selhala inicializace šifrovacího programu." + +#: ../libnm-util/crypto_gnutls.c:93 +#, c-format +msgid "Failed to initialize the MD5 engine: %s / %s." +msgstr "Selhala inicializace programu pro MD5: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:156 +#, c-format +msgid "Invalid IV length (must be at least %zd)." +msgstr "Neplatná délka IV (musí být nejméně %zd)." + +#: ../libnm-util/crypto_gnutls.c:165 ../libnm-util/crypto_nss.c:188 +#, c-format +msgid "Not enough memory for decrypted key buffer." +msgstr "Nedostatek paměti pro vyrovnávací paměť dešifrovaného klíče." + +#: ../libnm-util/crypto_gnutls.c:173 +#, c-format +msgid "Failed to initialize the decryption cipher context: %s / %s." +msgstr "Selhala inicializace kontextu dešifrovací šifry: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:182 +#, c-format +msgid "Failed to set symmetric key for decryption: %s / %s." +msgstr "Selhalo nastavení symetrického klíče pro dešifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:191 +#, c-format +msgid "Failed to set IV for decryption: %s / %s." +msgstr "Selhalo nastavení IV pro dekódování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:200 +#, c-format +msgid "Failed to decrypt the private key: %s / %s." +msgstr "Selhalo dekódování soukromého klíče: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:210 ../libnm-util/crypto_nss.c:267 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: unexpected padding length." +msgstr "Selhalo dešifrování soukromého klíče: neočekávané zarovnání délky." + +#: ../libnm-util/crypto_gnutls.c:221 ../libnm-util/crypto_nss.c:278 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key." +msgstr "Selhalo dešifrování soukromého klíče." + +#: ../libnm-util/crypto_gnutls.c:286 ../libnm-util/crypto_nss.c:356 +#, c-format +msgid "Could not allocate memory for encrypting." +msgstr "Nelze alokovat paměť pro šifrování." + +#: ../libnm-util/crypto_gnutls.c:294 +#, c-format +#| msgid "Failed to initialize the decryption cipher context: %s / %s." +msgid "Failed to initialize the encryption cipher context: %s / %s." +msgstr "Selhala inicializace kontextu šifrovací šifry: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:303 +#, c-format +#| msgid "Failed to set symmetric key for decryption: %s / %s." +msgid "Failed to set symmetric key for encryption: %s / %s." +msgstr "Selhalo nastavení symetrického klíče pro šifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:313 +#, c-format +#| msgid "Failed to set IV for decryption: %s / %s." +msgid "Failed to set IV for encryption: %s / %s." +msgstr "Selhalo nastavení IV pro šifrování: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:322 +#, c-format +#| msgid "Failed to decrypt the private key: %s / %s." +msgid "Failed to encrypt the data: %s / %s." +msgstr "Selhalo šifrování dat: %s / %s." + +#: ../libnm-util/crypto_gnutls.c:362 +#, c-format +msgid "Error initializing certificate data: %s" +msgstr "Chyba při inicializaci dat certifikátu: %s" + +#: ../libnm-util/crypto_gnutls.c:384 +#, c-format +msgid "Couldn't decode certificate: %s" +msgstr "Nelze dekódovat certifikát: %s" + +#: ../libnm-util/crypto_gnutls.c:408 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %s" +msgstr "Nelze inicializovat dekodér PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:421 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't decode PKCS#12 file: %s" +msgstr "Nelze dekódovat soubor PKCS#12: %s" + +#: ../libnm-util/crypto_gnutls.c:433 +#, c-format +#| msgid "Couldn't decode certificate: %s" +msgid "Couldn't verify PKCS#12 file: %s" +msgstr "Nelze ověřit soubor PKCS#12: %s" + +#: ../libnm-util/crypto_nss.c:56 +#, c-format +msgid "Failed to initialize the crypto engine: %d." +msgstr "Selhala inicializace šifrovacího programu: %d." + +#: ../libnm-util/crypto_nss.c:111 +#, c-format +msgid "Failed to initialize the MD5 context: %d." +msgstr "Selhala inicializace kontextu MD5: %d." + +#: ../libnm-util/crypto_nss.c:179 +#, c-format +msgid "Invalid IV length (must be at least %d)." +msgstr "Neplatná délka IV (musí být nejméně %d)." + +#: ../libnm-util/crypto_nss.c:196 +#, c-format +msgid "Failed to initialize the decryption cipher slot." +msgstr "Selhala inicializace slotu dešifrovací šifry." + +#: ../libnm-util/crypto_nss.c:206 +#, c-format +msgid "Failed to set symmetric key for decryption." +msgstr "Selhalo nastavení symetrického klíče pro dešifrování." + +#: ../libnm-util/crypto_nss.c:216 +#, c-format +msgid "Failed to set IV for decryption." +msgstr "Selhalo nastavení IV pro dešifrování." + +#: ../libnm-util/crypto_nss.c:224 +#, c-format +msgid "Failed to initialize the decryption context." +msgstr "Selhala inicializace dešifrovacího kontextu." + +#: ../libnm-util/crypto_nss.c:237 +#, c-format +msgid "Failed to decrypt the private key: %d." +msgstr "Selhalo dešifrování soukromého klíče: %d." + +#: ../libnm-util/crypto_nss.c:245 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to decrypt the private key: decrypted data too large." +msgstr "" +"Selhalo dešifrování soukromého klíče: dešifrovaná data jsou příliš velká." + +#: ../libnm-util/crypto_nss.c:256 +#, c-format +msgid "Failed to finalize decryption of the private key: %d." +msgstr "Selhalo dokončení dešifrování soukromého klíče: %d." + +#: ../libnm-util/crypto_nss.c:364 +#, c-format +#| msgid "Failed to initialize the decryption cipher slot." +msgid "Failed to initialize the encryption cipher slot." +msgstr "Selhala inicializace slotu šifrovací šifry." + +#: ../libnm-util/crypto_nss.c:372 +#, c-format +#| msgid "Failed to set symmetric key for decryption." +msgid "Failed to set symmetric key for encryption." +msgstr "Selhalo nastavení symetrického klíče pro šifrování." + +#: ../libnm-util/crypto_nss.c:380 +#, c-format +#| msgid "Failed to set IV for decryption." +msgid "Failed to set IV for encryption." +msgstr "Selhalo nastavení IV pro šifrování." + +#: ../libnm-util/crypto_nss.c:388 +#, c-format +#| msgid "Failed to initialize the decryption context." +msgid "Failed to initialize the encryption context." +msgstr "Selhala inicializace kontextu šifrování." + +#: ../libnm-util/crypto_nss.c:396 +#, c-format +#| msgid "Failed to decrypt the private key: %d." +msgid "Failed to encrypt: %d." +msgstr "Selhalo šifrování: %d" + +#: ../libnm-util/crypto_nss.c:404 +#, c-format +msgid "Unexpected amount of data after encrypting." +msgstr "Neočekávané množství dat po zašifrování." + +#: ../libnm-util/crypto_nss.c:447 +#, c-format +msgid "Couldn't decode certificate: %d" +msgstr "Nelze dekódovat certifikát: %d" + +#: ../libnm-util/crypto_nss.c:482 +#, c-format +msgid "Couldn't convert password to UCS2: %d" +msgstr "Nelze převést heslo na UCS2: %d" + +#: ../libnm-util/crypto_nss.c:510 +#, c-format +msgid "Couldn't initialize PKCS#12 decoder: %d" +msgstr "Nelze inicializovat dekodér PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:519 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't decode PKCS#12 file: %d" +msgstr "Nelze dekódovat soubor PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:528 +#, c-format +#| msgid "Couldn't decode certificate: %d" +msgid "Couldn't verify PKCS#12 file: %d" +msgstr "Nelze ověřit soubor PKCS#12: %d" + +#: ../libnm-util/crypto_nss.c:557 +#| msgid "Could not decode private key." +msgid "Could not generate random data." +msgstr "Nelze vygenerovat náhodná data." + +#: ../libnm-util/nm-utils.c:1818 +#, c-format +#| msgid "Not enough memory to create private key decryption key." +msgid "Not enough memory to make encryption key." +msgstr "Nedostatek paměti pro vytvoření šifrovacího klíče." + +#: ../libnm-util/nm-utils.c:1928 +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file creation." +msgstr "Nelze alokovat paměť pro vytvoření souboru PEM." + +#: ../libnm-util/nm-utils.c:1940 +#, c-format +msgid "Could not allocate memory for writing IV to PEM file." +msgstr "Nelze alokovat paměť pro zápis IV do souboru PEM." + +#: ../libnm-util/nm-utils.c:1952 +#, c-format +msgid "Could not allocate memory for writing encrypted key to PEM file." +msgstr "Nelze alokovat paměť pro zápis šifrovaného klíče do souboru PEM." + +#: ../libnm-util/nm-utils.c:1971 +#, c-format +#| msgid "Not enough memory to store PEM file data." +msgid "Could not allocate memory for PEM file data." +msgstr "Nelze alokovat paměť pro data souboru PEM." + +#: ../src/nm-netlink-monitor.c:195 ../src/nm-netlink-monitor.c:463 +#: ../src/nm-netlink-monitor.c:581 +#: ../src/ip6-manager/nm-netlink-listener.c:351 #, c-format msgid "error processing netlink message: %s" msgstr "chyba při zpracování zprávy netlink: %s" -#: ../src/nm-netlink-monitor.c:250 +#: ../src/nm-netlink-monitor.c:259 #, c-format msgid "unable to allocate netlink handle for monitoring link status: %s" msgstr "nelze alokovat ovládání netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:260 +#: ../src/nm-netlink-monitor.c:269 #, c-format msgid "unable to connect to netlink for monitoring link status: %s" msgstr "nelze se připojit k netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:268 +#: ../src/nm-netlink-monitor.c:277 #, c-format msgid "unable to join netlink group for monitoring link status: %s" msgstr "nelze se připojit ke skupině netlink pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:276 +#: ../src/nm-netlink-monitor.c:285 #, c-format msgid "unable to allocate netlink link cache for monitoring link status: %s" -msgstr "" -"nelze alokovat vyrovnávací paměť netlinku pro sledování stavu spojení: %s" +msgstr "nelze alokovat mezipaměť netlinku pro sledování stavu spojení: %s" -#: ../src/nm-netlink-monitor.c:439 +#: ../src/nm-netlink-monitor.c:493 +#: ../src/ip6-manager/nm-netlink-listener.c:381 +msgid "error occurred while waiting for data on socket" +msgstr "vyskytla se chyba při čekání na data ze soketu" + +#: ../src/nm-netlink-monitor.c:557 ../src/nm-netlink-monitor.c:570 #, c-format msgid "error updating link cache: %s" -msgstr "chyba při aktualizaci link cache: %s" +msgstr "chyba při aktualizaci mezipaměti spojení: %s" -#: ../src/nm-netlink-monitor.c:497 -#, c-format -msgid "error occurred while waiting for data on socket" -msgstr "při čekání na data ze socketu došlo k chybě" - -#: ../src/NetworkManager.c:250 +#: ../src/main.c:498 #, c-format msgid "Invalid option. Please use --help to see a list of valid options.\n" -msgstr "Neplatná volba. Platné volby uvidíte při použití --help.\n" +msgstr "" +"Neplatný přepínač. Platné přepínače si můžete zobrazit pomocí --help.\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:89 +#: ../src/main.c:558 +#, c-format +#| msgid "Invalid option. Please use --help to see a list of valid options.\n" +msgid "%s. Please use --help to see a list of valid options.\n" +msgstr "%s. Pomocí --help si prosím zobrazte seznam platných přepínačů.\n" + +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:325 msgid "# Created by NetworkManager\n" msgstr "# Vytvořeno NetworkManagerem\n" -#: ../src/dhcp-manager/nm-dhcp-dhclient.c:95 +#: ../src/dhcp-manager/nm-dhcp-dhclient.c:341 #, c-format msgid "" "# Merged from %s\n" @@ -73,201 +1290,97 @@ msgstr "" "# Sloučeno z %s\n" "\n" -#: ../src/named-manager/nm-named-manager.c:256 +#: ../src/dhcp-manager/nm-dhcp-manager.c:279 +msgid "no usable DHCP client could be found." +msgstr "nebyl nalezen žádný použitelný klient DHCP." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:288 +msgid "'dhclient' could be found." +msgstr "„dhclient“ byl nalezen." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:298 +msgid "'dhcpcd' could be found." +msgstr "„dhcpcd“ byl nalezen." + +#: ../src/dhcp-manager/nm-dhcp-manager.c:306 +#, c-format +msgid "unsupported DHCP client '%s'" +msgstr "nepodporovaný klient DHCP „%s“" + +#: ../src/ip6-manager/nm-netlink-listener.c:199 +#, c-format +#| msgid "unable to allocate netlink handle for monitoring link status: %s" +msgid "unable to allocate netlink handle: %s" +msgstr "nelze alokovat ovládání netlinku: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:209 +#, c-format +#| msgid "unable to connect to netlink for monitoring link status: %s" +msgid "unable to connect to netlink: %s" +msgstr "nelze se připojit k netlinku: %s" + +#: ../src/ip6-manager/nm-netlink-listener.c:306 +#, c-format +#| msgid "unable to join netlink group for monitoring link status: %s" +msgid "unable to join netlink group: %s" +msgstr "nelze se připojit ke skupině netlink: %s" + +#: ../src/logging/nm-logging.c:146 +#, c-format +msgid "Unknown log level '%s'" +msgstr "Neznámá úroveň evidence „%s“" + +#: ../src/logging/nm-logging.c:171 +#, c-format +msgid "Unknown log domain '%s'" +msgstr "Neznámá doména evidence „%s“" + +#: ../src/named-manager/nm-named-manager.c:314 msgid "NOTE: the libc resolver may not support more than 3 nameservers." -msgstr "Poznámka: libc resolver nemůže podporovat více než 3 nameservery." +msgstr "" +"Poznámka: překladač adres z libc nemůže podporovat více než 3 jmenné servery." -#: ../src/named-manager/nm-named-manager.c:258 +#: ../src/named-manager/nm-named-manager.c:316 msgid "The nameservers listed below may not be recognized." -msgstr "Nameservery uvedené v seznamu dole nelze rozpoznat." +msgstr "Jmenné servery uvedené v následujícím seznamu nelze rozpoznat." -#: ../system-settings/src/main.c:366 +#: ../src/system-settings/nm-default-wired-connection.c:157 #, c-format msgid "Auto %s" -msgstr "Auto %s" +msgstr "%s (automaticky)" -#: ../libnm-util/crypto.c:125 -#, c-format -msgid "PEM key file had no end tag '%s'." -msgstr "Soubor klíče PEM neměl koncovou značku '%s'." +#: ../system-settings/plugins/ifcfg-rh/reader.c:3213 +msgid "System" +msgstr "Systém" -#: ../libnm-util/crypto.c:135 -#, c-format -msgid "Doesn't look like a PEM private key file." -msgstr "Nevypadá jako soubor soukromého klíče PEM." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:1 +msgid "Connection sharing via a protected WiFi network" +msgstr "Sdílení připojení přes chráněnou síť WiFi" -#: ../libnm-util/crypto.c:143 -#, c-format -msgid "Not enough memory to store PEM file data." -msgstr "Není dostatek paměti na uložení dat PEM souboru." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:2 +msgid "Connection sharing via an open WiFi network" +msgstr "Sdílení připojení přes otevřenou síť WiFi" -#: ../libnm-util/crypto.c:159 -#, c-format -msgid "Malformed PEM file: Proc-Type was not first tag." -msgstr "Nesprávný PEM soubor: Proc-Type nebylo první značkou." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:3 +msgid "Modify persistent system hostname" +msgstr "Měnit trvalý systémový název počítače" -#: ../libnm-util/crypto.c:167 -#, c-format -msgid "Malformed PEM file: unknown Proc-Type tag '%s'." -msgstr "Nesprávný PEM soubor: neznámá značka Proc-Type '%s'." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:4 +msgid "Modify system connections" +msgstr "Měnit systémová připojení" -#: ../libnm-util/crypto.c:177 -#, c-format -msgid "Malformed PEM file: DEK-Info was not the second tag." -msgstr "Nesprávný PEM soubor: DEK-Info nebylo druhou značkou." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:5 +msgid "System policy prevents modification of system settings" +msgstr "Systémová politika zabránila změně systémového nastavení." -#: ../libnm-util/crypto.c:188 -#, c-format -msgid "Malformed PEM file: no IV found in DEK-Info tag." -msgstr "Nesprávný PEM soubor: nebylo nalezeno IV ve značce DEK-Info." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:6 +msgid "System policy prevents modification of the persistent system hostname" +msgstr "Systémová politika zabránila změně trvalého systémového názvu počítače" -#: ../libnm-util/crypto.c:195 -#, c-format -msgid "Malformed PEM file: invalid format of IV in DEK-Info tag." -msgstr "Nesprávný PEM soubor: neplatný formát IV ve značce DEK-Info." +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:7 +msgid "System policy prevents sharing connections via a protected WiFi network" +msgstr "Systémová politika zabránila sdílení připojení přes chráněnou síť WiFi" -#: ../libnm-util/crypto.c:208 -#, c-format -msgid "Malformed PEM file: unknown private key cipher '%s'." -msgstr "Nesprávný PEM soubor: neznámá šifra soukromého klíče '%s'." - -#: ../libnm-util/crypto.c:227 -#, c-format -msgid "Could not decode private key." -msgstr "Nelze dekódovat soukromý klíč." - -#: ../libnm-util/crypto.c:271 -#, c-format -msgid "PEM certificate '%s' had no end tag '%s'." -msgstr "PEM certifikát '%s' nemá koncovou značku '%s'." - -#: ../libnm-util/crypto.c:281 -#, c-format -msgid "Failed to decode certificate." -msgstr "Selhalo dekódování certifikátu." - -#: ../libnm-util/crypto.c:290 ../libnm-util/crypto.c:298 -#, c-format -msgid "Not enough memory to store certificate data." -msgstr "Není dostatek paměti na uložení dat certifikátu." - -#: ../libnm-util/crypto.c:328 -#, c-format -msgid "IV must be an even number of bytes in length." -msgstr "IV musí být sudé číslo bajtů na délku." - -#: ../libnm-util/crypto.c:337 -#, c-format -msgid "Not enough memory to store the IV." -msgstr "Není dostatek paměti pro uložení IV." - -#: ../libnm-util/crypto.c:348 -#, c-format -msgid "IV contains non-hexadecimal digits." -msgstr "IV obsahuje nešestnáctkové číslice." - -#: ../libnm-util/crypto.c:386 ../libnm-util/crypto_gnutls.c:143 -#: ../libnm-util/crypto_nss.c:157 -#, c-format -msgid "Private key cipher '%s' was unknown." -msgstr "Šifra soukromého klíče '%s' je neznámá." - -#: ../libnm-util/crypto.c:395 -#, c-format -msgid "Not enough memory to create private key decryption key." -msgstr "" -"Není dostatek paměti pro vytvoření dešifrovacího klíče k soukromému klíči." - -#: ../libnm-util/crypto.c:513 -#, c-format -msgid "Not enough memory to store decrypted private key." -msgstr "Není dostatek paměti pro uložení dešifrovaného soukromého klíče." - -#: ../libnm-util/crypto_gnutls.c:45 -msgid "Failed to initialize the crypto engine." -msgstr "Nelze inicializovat šifrovací engine." - -#: ../libnm-util/crypto_gnutls.c:89 -#, c-format -msgid "Failed to initialize the MD5 engine: %s / %s." -msgstr "Nelze inicializovat MD5 engine: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:152 ../libnm-util/crypto_nss.c:166 -#, c-format -msgid "Not enough memory for decrypted key buffer." -msgstr "Není dostatek paměti pro vyrovnávací paměť dešifrovaného klíče." - -#: ../libnm-util/crypto_gnutls.c:160 -#, c-format -msgid "Failed to initialize the decryption cipher context: %s / %s." -msgstr "Nelze inicializovat kontext dekódovací šifry: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:169 -#, c-format -msgid "Failed to set symmetric key for decryption: %s / %s." -msgstr "Nelze nastavit symetrický klíč pro dekódování: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:178 -#, c-format -msgid "Failed to set IV for decryption: %s / %s." -msgstr "Nelze nastavit IV pro dekódování: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:187 -#, c-format -msgid "Failed to decrypt the private key: %s / %s." -msgstr "Nelze dekódovat soukromý klíč: %s / %s." - -#: ../libnm-util/crypto_gnutls.c:225 -#, c-format -msgid "Error initializing certificate data: %s" -msgstr "Chyba při inicializaci dat certifikátu: %s" - -#: ../libnm-util/crypto_gnutls.c:237 -#, c-format -msgid "Couldn't decode certificate: %s" -msgstr "Nelze dekódovat certifikát: %s" - -#: ../libnm-util/crypto_nss.c:52 -#, c-format -msgid "Failed to initialize the crypto engine: %d." -msgstr "Nelze inicializovat šifrovací engine: %d." - -#: ../libnm-util/crypto_nss.c:98 -#, c-format -msgid "Failed to initialize the MD5 context: %d." -msgstr "Nelze inicializovat MD5 kontext: %d." - -#: ../libnm-util/crypto_nss.c:174 -#, c-format -msgid "Failed to initialize the decryption cipher slot." -msgstr "Nelze inicializovat slot dekódovací šifry." - -#: ../libnm-util/crypto_nss.c:184 -#, c-format -msgid "Failed to set symmetric key for decryption." -msgstr "Nelze nastavit symetrický klíč pro dekódování." - -#: ../libnm-util/crypto_nss.c:194 -#, c-format -msgid "Failed to set IV for decryption." -msgstr "Nelze nastavit IV pro dekódování." - -#: ../libnm-util/crypto_nss.c:202 -#, c-format -msgid "Failed to initialize the decryption context." -msgstr "Nelze inicializovat kontext dekódování." - -#: ../libnm-util/crypto_nss.c:215 -#, c-format -msgid "Failed to decrypt the private key: %d." -msgstr "Nelze dekódovat soukromý klíč: %d." - -#: ../libnm-util/crypto_nss.c:227 -#, c-format -msgid "Failed to finalize decryption of the private key: %d." -msgstr "Nelze dokončit dekódování soukromého klíče: %d." - -#: ../libnm-util/crypto_nss.c:271 -#, c-format -msgid "Couldn't decode certificate: %d" -msgstr "Nelze dekódovat certifikát: %d" +#: ../policy/org.freedesktop.network-manager-settings.system.policy.in.h:8 +msgid "System policy prevents sharing connections via an open WiFi network" +msgstr "Systémová politika zabránila sdílení připojení přes otevřenou síť WiFi" From 9b944dec961e06865c622fbaf597ac35353f26a0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 25 Apr 2010 09:52:01 -0700 Subject: [PATCH 104/105] core: ignore mobile broadband ethernet devices that aren't usable (rh #585214) Not all ethernet devices are immediately usable; newer mobile broadband devices (Ericsson, Option, Sierra) require setup on the tty before the ethernet device is usable. 2.6.33 and later kernels set the 'DEVTYPE' uevent variable which we can use to ignore the interface as a NMDevice subclass. ModemManager will pick it up though and so we'll handle it through the mobile broadband stuff. --- src/nm-udev-manager.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index 0ced962c27..1e84c04cc6 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -401,18 +401,36 @@ out: static void net_add (NMUdevManager *self, GUdevDevice *device) { - gint devtype; + gint etype; const char *iface; + const char *devtype; g_return_if_fail (device != NULL); - devtype = g_udev_device_get_sysfs_attr_as_int (device, "type"); - if (devtype != 1) + etype = g_udev_device_get_sysfs_attr_as_int (device, "type"); + if (etype != 1) { + nm_log_dbg (LOGD_HW, "ignoring interface with type %d", etype); return; /* Not using ethernet encapsulation, don't care */ + } + + /* Not all ethernet devices are immediately usable; newer mobile broadband + * devices (Ericsson, Option, Sierra) require setup on the tty before the + * ethernet device is usable. 2.6.33 and later kernels set the 'DEVTYPE' + * uevent variable which we can use to ignore the interface as a NMDevice + * subclass. ModemManager will pick it up though and so we'll handle it + * through the mobile broadband stuff. + */ + devtype = g_udev_device_get_property (device, "DEVTYPE"); + if (devtype && !strcmp (devtype, "wwan")) { + nm_log_dbg (LOGD_HW, "ignoring interface with devtype '%s'", devtype); + return; + } iface = g_udev_device_get_name (device); - if (!iface) + if (!iface) { + nm_log_dbg (LOGD_HW, "failed to get device's interface"); return; + } g_signal_emit (self, signals[DEVICE_ADDED], 0, device, device_creator); } From 0ad8fc1adc6ee3e59ab8963f94c106cb71af3345 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sun, 25 Apr 2010 22:48:10 -0700 Subject: [PATCH 105/105] libnm-glib: use max timeout for settings dbus calls These calls may require authentication, and thus could be in-progress for much longer than the default D-Bus timeout, which is pretty short. --- libnm-glib/nm-remote-connection.c | 4 +++- libnm-glib/nm-remote-settings-system.c | 3 ++- libnm-glib/nm-remote-settings.c | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index 64956471be..5d104d0680 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2009 Red Hat, Inc. + * Copyright (C) 2007 - 2010 Red Hat, Inc. */ #include @@ -324,12 +324,14 @@ constructor (GType type, nm_connection_get_path (NM_CONNECTION (object)), NM_DBUS_IFACE_SETTINGS_CONNECTION); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); priv->secrets_proxy = dbus_g_proxy_new_for_name (priv->bus, service, nm_connection_get_path (NM_CONNECTION (object)), NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS); g_assert (priv->secrets_proxy); + dbus_g_proxy_set_default_timeout (priv->secrets_proxy, G_MAXINT); dbus_g_proxy_add_signal (priv->proxy, "Updated", DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, G_TYPE_INVALID); dbus_g_proxy_connect_signal (priv->proxy, "Updated", G_CALLBACK (updated_cb), object, NULL); diff --git a/libnm-glib/nm-remote-settings-system.c b/libnm-glib/nm-remote-settings-system.c index 4e30fda800..95098c7e60 100644 --- a/libnm-glib/nm-remote-settings-system.c +++ b/libnm-glib/nm-remote-settings-system.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -280,6 +280,7 @@ constructor (GType type, NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS_SYSTEM); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); dbus_g_object_register_marshaller (g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index 55ae0f3a14..92814a15ce 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -18,7 +18,7 @@ * Boston, MA 02110-1301 USA. * * Copyright (C) 2008 Novell, Inc. - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009 - 2010 Red Hat, Inc. */ #include @@ -414,6 +414,7 @@ constructor (GType type, NM_DBUS_PATH_SETTINGS, NM_DBUS_IFACE_SETTINGS); g_assert (priv->proxy); + dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT); dbus_g_proxy_add_signal (priv->proxy, "NewConnection", DBUS_TYPE_G_OBJECT_PATH,