Sponsored Content
Full Discussion: Chardev.c
Operating Systems Linux Chardev.c Post 302778343 by Corona688 on Sunday 10th of March 2013 01:31:41 PM
Old 03-10-2013
Quote:
Originally Posted by blair15
thank u so much for replying..
i have a few doubts--
1. where should i call these functions(device_read, device_open,..) in user or kernel space module ? or are these invoked automatically when corresponding action is performed ??
They are invoked automatically when the corresponding userspace action happens. That's why you have to pile them all into a structure, so the kernel can load them.
Quote:
2. what is ioctl ?
The userspace ioctl function. It can do a variety of things, often a way to configure a device. See man ioctl.
Quote:
also why in device_write function the operation isn't supported ??
To keep the example simple.
This User Gave Thanks to Corona688 For This Post:
 
SRU::Server(3pm)					User Contributed Perl Documentation					  SRU::Server(3pm)

NAME
SRU::Server - respond to SRU requests via CGI::Application SYNOPSIS
package MySRU; use base qw( SRU::Server ); sub explain { my $self = shift; # $self->request isa SRU::Request::Explain # $self->response isa SRU::Response::Explain } sub scan { my $self = shift; # $self->request isa SRU::Request::Scan # $self->response isa SRU::Response::Scan # $self->cql is the root node of a CQL::Parser-parsed query } sub searchRetrieve { my $self = shift; # $self->request isa SRU::Request::SearchRetrieve # $self->response isa SRU::Response::SearchRetrieve # $self->cql is the root node of a CQL::Parser-parsed query } package main; MySRU->new->run; DESCRIPTION
This module brings together all of the SRU verbs (explain, scan and searchRetrieve) under a sub-classable object based on CGI::Application. METHODS
explain This method is used to return an explain response. It is the default method. scan This method returns a scan response. searchRetrieve This method returns a searchRetrieve response. CGI
::APPLICATION METHODS setup Sets the "run_modes", "mode_param" and the default runmode (explain). cgiapp_prerun Parses the incoming SRU request and if needed, checks the CQL query. cgiapp_postrun Sets the content type (text/xml) and serializes the response. error_mode Stub error runmode. AUTHORS
o Brian Cassidy <bricas@cpan.org> o Ed Summers <ehs@pobox.com> perl v5.12.4 2009-11-20 SRU::Server(3pm)
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy