Lines Matching refs:entry
97 #define NFS_DIR_ENTRY_MALLOC(entry) \
100 entry = (struct entry3 *)malloc(sizeof(struct entry3)); \
101 if (entry == NULL) \
107 (void)memset_s(entry, sizeof(struct entry3), 0, sizeof(struct entry3)); \
111 #define NFS_DIR_ENTRY_FREE(entry) \
114 free(entry->contents); \
115 entry->contents = NULL; \
116 free(entry); \
117 entry = NULL; \
972 struct entry3 *entry = NULL;
1045 /* Number of directory entries (We currently only process one entry at a time) */
1119 * will follow the header. Each entry is of the form:
1125 * next entry (4 bytes)
1130 NFS_DIR_ENTRY_MALLOC(entry);
1132 /* There is an entry. Skip over the file ID and point to the length */
1134 entry->file_id[0] = *ptr++;
1135 entry->file_id[1] = *ptr++; /*lint !e662 !e661*/
1140 entry->name_len = fxdr_unsigned(uint32_t, tmp);
1141 entry->contents = (uint8_t *)malloc(entry->name_len + 1);
1142 if (!entry->contents)
1144 free(entry);
1145 entry = NULL;
1148 (void)memset_s(entry->contents, entry->name_len + 1, 0, entry->name_len + 1);
1150 error = strncpy_s((char *)entry->contents, entry->name_len + 1, (const char *)ptr, entry->name_len);
1153 free(entry->contents);
1154 entry->contents = NULL;
1155 free(entry);
1156 entry = NULL;
1164 ptr += uint32_increment(entry->name_len);
1166 /* Save the cookie and increment the pointer to the next entry */
1168 entry->cookie[0] = *ptr++;
1169 entry->cookie[1] = *ptr++;
1175 if (strcmp((char *)entry->contents, ".") == 0 || strcmp((char *)entry->contents, "..") == 0)
1177 NFS_DIR_ENTRY_FREE(entry);
1183 entry_pos = entry;
1184 nfs_dir->nfs_entries = entry;
1188 entry_pos->next = entry;
1189 entry_pos = entry;
1207 NFS_DIR_ENTRY_MALLOC(entry);
1209 /* There is an entry. Skip over the file ID and point to the length */
1211 entry->file_id[0] = (uint32_t)EOF;
1215 NFS_DIR_ENTRY_FREE(entry);
1218 entry_pos->next = entry;
1219 entry_pos = entry;
1660 * RPC calls in that the entry RPC calls messasge lies in the I/O buffer
1871 * RPC calls in that the entry RPC calls messasge lies in the I/O buffer