Example #1
0
/*
 * fnic_trace_debugfs_lseek - Seek through a debugfs file
 * @file: The file pointer to seek through.
 * @offset: The offset to seek to or the amount to seek by.
 * @howto: Indicates how to seek.
 *
 * Description:
 * This routine is the entry point for the debugfs lseek file operation.
 * The @howto parameter indicates whether @offset is the offset to directly
 * seek to, or if it is a value to seek forward or reverse by. This function
 * figures out what the new offset of the debugfs file will be and assigns
 * that value to the f_pos field of @file.
 *
 * Returns:
 * This function returns the new offset if successful and returns a negative
 * error if unable to process the seek.
 */
static loff_t fnic_trace_debugfs_lseek(struct file *file,
					loff_t offset,
					int howto)
{
	fnic_dbgfs_t *fnic_dbg_prt = file->private_data;
	return fixed_size_llseek(file, offset, howto,
				fnic_dbg_prt->buffer_len);
}
Example #2
0
static loff_t lseek(struct file *file, loff_t off, int whence)
{
	struct ctrl_dbg *dbg = file->private_data;
	return fixed_size_llseek(file, off, whence, dbg->size);
}
Example #3
0
static loff_t
proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
{
	return fixed_size_llseek(file, off, whence, sizeof(struct ConfigDev));
}
static loff_t page_map_seek(struct file *file, loff_t off, int whence)
{
	return fixed_size_llseek(file, off, whence, PAGE_SIZE);
}
Example #5
0
static loff_t
proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
{
    struct pci_dev *dev = PDE_DATA(file_inode(file));
    return fixed_size_llseek(file, off, whence, dev->cfg_size);
}