EmbLogic's Blog

algo for open function

1: define a local device.

2: fetch minor no.

2.a: check for errors.

3: assign previously allocated scull_dev to a local scull_dev.

3.a: check for errors.

3.b: cleanup_module();(if minor no. is wrong)

4: check file open in write mode by && O_ACCMOD with flags.

4.a: truncate the file.

5: preserve the local device into scull_dev.

4 Responses to algo for open function

  1. shivdeep says:

    i am facing a problem in step 3b in while programming in 2.6 kernel in calling cleanup function defined in module_exit() macro, while declaring exit function as static….any1 has some clues???

  2. gulpreet.e2 says:

    Can anyone tell me that why there are 8 bits in 1 byte?

  3. shivdeep says:

    earlier scientists used 2, 4,8 or 16 bits to represent 1 character. I was called a byte and it was different for diffferent architectures.. Later IBM made 8 bit standard byte because 8 bits could represent 2 BCD digits and could cover whole set of 7 bit ascii.

Leave a Reply to spatlou Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>