Lines Matching refs:buffer

192 			void *buffer, fssh_size_t *);
194 const void *buffer, fssh_size_t *);
200 struct fssh_dirent *buffer, fssh_size_t bufferSize,
203 struct fssh_dirent *buffer, fssh_size_t bufferSize,
209 struct fssh_dirent *buffer, fssh_size_t bufferSize,
215 void *buffer, fssh_size_t *);
217 const void *buffer, fssh_size_t *);
227 struct fssh_dirent *buffer, fssh_size_t bufferSize,
233 struct fssh_dirent *buffer, fssh_size_t bufferSize,
249 static fssh_status_t dir_vnode_to_path(struct vnode *vnode, char *buffer,
998 * the entry identified by the original path, and into the buffer \a filename
1005 * \param filename The buffer into which the leaf name will be written.
1087 component. This function clobbers the buffer pointed to by \a path only
1158 char *buffer;
1168 buffer = (char *)malloc(bufferSize = FSSH_B_PATH_NAME_LENGTH);
1169 if (buffer == NULL) {
1176 status = FS_CALL(nextVnode, read_symlink, buffer,
1180 buffer[bufferSize] = '\0';
1185 free(buffer);
1198 path = buffer;
1215 free(buffer);
1287 * The path buffer must be able to store at least one additional character.
1314 * \param path The absolute or relative path. Must not be \c NULL. The buffer
1319 * \param filename A buffer of size FSSH_B_FILE_NAME_LENGTH or larger into which
1343 /** Returns a vnode's name in the d_name field of a supplied dirent buffer.
1348 struct fssh_dirent *buffer, fssh_size_t bufferSize)
1364 return FS_CALL(vnode, get_vnode_name, buffer->d_name,
1365 (char*)buffer + bufferSize - buffer->d_name);
1380 status = dir_read(parent, cookie, buffer, bufferSize, &num);
1388 if (vnode->id == buffer->d_ino) {
1405 char buffer[sizeof(struct fssh_dirent) + FSSH_B_FILE_NAME_LENGTH];
1406 struct fssh_dirent *dirent = (struct fssh_dirent *)buffer;
1408 fssh_status_t status = get_vnode_name(vnode, parent, buffer, sizeof(buffer));
1436 dir_vnode_to_path(struct vnode *vnode, char *buffer, fssh_size_t bufferSize)
1438 FUNCTION(("dir_vnode_to_path(%p, %p, %lu)\n", vnode, buffer, bufferSize));
1440 if (vnode == NULL || buffer == NULL)
1468 // the name buffer is also used for fs_read_dir()
1531 // copy the path to the output buffer
1534 fssh_memcpy(buffer, path + insert, length);
1546 * The given path buffer must be able to store at least one
2358 char *buffer = pathBuffer.LockBuffer();
2359 fssh_strlcpy(buffer, path, pathBuffer.BufferSize());
2362 fssh_status_t status = path_to_vnode(buffer, true, &vnode, NULL, kernel);
2465 char *buffer = pathBuffer.LockBuffer();
2466 fssh_strlcpy(buffer, path, pathBuffer.BufferSize());
2470 if (buffer[0] == '/')
2471 status = path_to_vnode(buffer, true, &vnode, NULL, true);
2475 status = vnode_path_to_vnode(vnode, buffer, true, 0, &vnode, NULL);
2521 // the path buffer had been clobbered by the above call
2599 * \param buffer The buffer into which the normalized path will be written.
2600 * \param bufferSize The size of \a buffer.
2608 vfs_normalize_path(const char *path, char *buffer, fssh_size_t bufferSize,
2611 if (!path || !buffer || bufferSize < 1)
2646 error = dir_vnode_to_path(dirNode, buffer, bufferSize);
2656 if ((fssh_strcmp(buffer, "/") != 0
2657 && fssh_strlcat(buffer, "/", bufferSize) >= bufferSize)
2658 || fssh_strlcat(buffer, leaf, bufferSize) >= bufferSize) {
2663 TRACE(("vfs_normalize_path() -> `%s'\n", buffer));
3196 file_read(struct file_descriptor *descriptor, fssh_off_t pos, void *buffer, fssh_size_t *length)
3200 FUNCTION(("file_read: buf %p, pos %lld, len %p = %ld\n", buffer, pos, length, *length));
3201 return FS_CALL(vnode, read, descriptor->cookie, pos, buffer, length);
3206 file_write(struct file_descriptor *descriptor, fssh_off_t pos, const void *buffer, fssh_size_t *length)
3210 FUNCTION(("file_write: buf %p, pos %lld, len %p\n", buffer, pos, length));
3211 return FS_CALL(vnode, write, descriptor->cookie, pos, buffer, length);
3387 dir_read(struct file_descriptor *descriptor, struct fssh_dirent *buffer,
3390 return dir_read(descriptor->u.vnode, descriptor->cookie, buffer, bufferSize, _count);
3438 dir_read(struct vnode *vnode, void *cookie, struct fssh_dirent *buffer,
3444 fssh_status_t error = FS_CALL(vnode, read_dir,cookie,buffer,bufferSize,_count);
3451 fix_dirent(vnode, buffer);
3514 common_ioctl(struct file_descriptor *descriptor, uint32_t op, void *buffer,
3521 descriptor->cookie, op, buffer, length);
3701 common_read_link(int fd, char *path, char *buffer, fssh_size_t *_bufferSize,
3712 status = FS_CALL(vnode, read_symlink, buffer, _bufferSize);
4001 attr_dir_read(struct file_descriptor *descriptor, struct fssh_dirent *buffer,
4009 return FS_CALL(vnode, read_attr_dir, descriptor->cookie, buffer, bufferSize, _count);
4131 attr_read(struct file_descriptor *descriptor, fssh_off_t pos, void *buffer, fssh_size_t *length)
4135 FUNCTION(("attr_read: buf %p, pos %lld, len %p = %ld\n", buffer, pos, length, *length));
4139 return FS_CALL(vnode, read_attr, descriptor->cookie, pos, buffer, length);
4144 attr_write(struct file_descriptor *descriptor, fssh_off_t pos, const void *buffer, fssh_size_t *length)
4148 FUNCTION(("attr_write: buf %p, pos %lld, len %p\n", buffer, pos, length));
4152 return FS_CALL(vnode, write_attr, descriptor->cookie, pos, buffer, length);
4362 index_dir_read(struct file_descriptor *descriptor, struct fssh_dirent *buffer,
4368 return FS_MOUNT_CALL(mount, read_index_dir, descriptor->cookie, buffer, bufferSize, _count);
4526 query_read(struct file_descriptor *descriptor, struct fssh_dirent *buffer,
4532 return FS_MOUNT_CALL(mount, read_query, descriptor->cookie, buffer, bufferSize, _count);
5010 get_cwd(char *buffer, fssh_size_t size, bool kernel)
5016 FUNCTION(("vfs_get_cwd: buf %p, size %ld\n", buffer, size));
5021 status = dir_vnode_to_path(context->cwd, buffer, size);
5323 * will still be updated to reflect the required buffer size.
5327 * \param buffer The buffer into which the contents of the symlink shall be
5329 * \param _bufferSize A pointer to the size of the supplied buffer.
5334 _kern_read_link(int fd, const char *path, char *buffer, fssh_size_t *_bufferSize)
5342 buffer, _bufferSize, true);
5345 return common_read_link(fd, NULL, buffer, _bufferSize, true);
5478 * \param stat The buffer the stat data shall be written into.
5479 * \param statSize The size of the supplied stat buffer.
5545 * \param stat The buffer containing the stat data to be written.
5546 * \param statSize The size of the supplied stat buffer.
5669 _kern_getcwd(char *buffer, fssh_size_t size)
5671 TRACE(("_kern_getcwd: buf %p, %ld\n", buffer, size));
5674 return get_cwd(buffer, size, true);