Changeset f65d9cc in mainline for uspace/lib/c
- Timestamp:
- 2013-09-21T05:28:00Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 026271d5
- Parents:
- 772a172 (diff), b9f7848b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/c
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inetcfg.c
r772a172 rf65d9cc 279 279 aid_t req = async_send_1(exch, INETCFG_LINK_GET, link_id, &answer); 280 280 aid_t dreq = async_data_read(exch, name_buf, LOC_NAME_MAXLEN, &dreply); 281 int rc = async_data_read_start(exch, &linfo->mac_addr, sizeof(addr48_t)); 281 282 async_wait_for(dreq, &dretval); 282 283 283 284 async_exchange_end(exch); 284 285 285 if (dretval != EOK ) {286 if (dretval != EOK || rc != EOK) { 286 287 async_forget(req); 287 288 return dretval; -
uspace/lib/c/generic/vfs/vfs.c
r772a172 rf65d9cc 893 893 } 894 894 895 int statfs(const char *path, struct statfs *statfs) 896 { 897 sysarg_t rc; 898 sysarg_t rc_orig; 895 int statfs(const char *path, struct statfs *st) 896 { 897 sysarg_t rc, rc_orig; 899 898 aid_t req; 900 899 size_t pa_size; 901 900 902 901 char *pa = absolutize(path, &pa_size); 903 902 if (!pa) 904 903 return ENOMEM; 905 async_exch_t *exch = vfs_exchange_begin(); 906 904 905 async_exch_t *exch = vfs_exchange_begin(); 906 907 907 req = async_send_0(exch, VFS_IN_STATFS, NULL); 908 908 rc = async_data_write_start(exch, pa, pa_size); 909 if (rc != EOK) { 910 vfs_exchange_end(exch); 911 free(pa); 912 async_wait_for(req, &rc_orig); 913 if (rc_orig == EOK) 914 return (int) rc; 915 else 916 return (int) rc_orig; 917 } 918 rc = async_data_read_start(exch, (void *) statfs, sizeof(struct statfs)); 919 if (rc != EOK) { 920 vfs_exchange_end(exch); 921 free(pa); 922 async_wait_for(req, &rc_orig); 923 if (rc_orig == EOK) 924 return (int) rc; 925 else 926 return (int) rc_orig; 927 } 909 if (rc != EOK) 910 goto exit; 911 912 rc = async_data_read_start(exch, (void *) st, sizeof(*st)); 913 914 exit: 928 915 vfs_exchange_end(exch); 929 916 free(pa); 930 async_wait_for(req, &rc );931 return rc;917 async_wait_for(req, &rc_orig); 918 return (int) (rc_orig != EOK ? rc_orig : rc); 932 919 } 933 920 -
uspace/lib/c/include/inet/inet.h
r772a172 rf65d9cc 39 39 #include <ipc/loc.h> 40 40 #include <sys/types.h> 41 42 #define INET_TTL_MAX 255 43 44 typedef struct { 45 /** Local IP link service ID (optional) */ 46 service_id_t iplink; 47 inet_addr_t src; 48 inet_addr_t dest; 49 uint8_t tos; 50 void *data; 51 size_t size; 52 } inet_dgram_t; 53 54 typedef struct { 55 int (*recv)(inet_dgram_t *); 56 } inet_ev_ops_t; 57 58 typedef enum { 59 INET_DF = 1 60 } inet_df_t; 41 #include <types/inet.h> 61 42 62 43 extern int inet_init(uint8_t, inet_ev_ops_t *); -
uspace/lib/c/include/inet/inetcfg.h
r772a172 rf65d9cc 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 /** Address object info */ 42 typedef struct { 43 /** Network address */ 44 inet_naddr_t naddr; 45 /** Link service ID */ 46 sysarg_t ilink; 47 /** Address object name */ 48 char *name; 49 } inet_addr_info_t; 50 51 /** IP link info */ 52 typedef struct { 53 /** Link service name */ 54 char *name; 55 /** Default MTU */ 56 size_t def_mtu; 57 } inet_link_info_t; 58 59 /** Static route info */ 60 typedef struct { 61 /** Destination network address */ 62 inet_naddr_t dest; 63 /** Router address */ 64 inet_addr_t router; 65 /** Static route name */ 66 char *name; 67 } inet_sroute_info_t; 40 #include <types/inetcfg.h> 68 41 69 42 extern int inetcfg_init(void);
Note:
See TracChangeset
for help on using the changeset viewer.