<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3023753433804259679</id><updated>2011-07-07T20:49:08.702-07:00</updated><category term='linux network'/><category term='linux programming'/><category term='linux software'/><category term='linux command'/><category term='linux socket'/><category term='linux driver'/><category term='c'/><title type='text'>deeply love linux</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>80</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1170744517425796315</id><published>2009-09-10T00:08:00.001-07:00</published><updated>2009-09-10T00:08:23.765-07:00</updated><title type='text'>install java on linux</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: 19px; color: rgb(51, 51, 51); line-height: 29px; "&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; font-size: 11pt; "&gt;chmod +x jdk-6u16-linux-x64-rpm.bin&lt;/p&gt;&lt;p style="margin-top: 0in; margin-right: 0in; margin-bottom: 0in; margin-left: 0in; font-family: Calibri; font-size: 11pt; "&gt;su -c ./jdk-6u16-linux-x64-rpm.bin&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1170744517425796315?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1170744517425796315/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1170744517425796315' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1170744517425796315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1170744517425796315'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2009/09/install-java-on-linux.html' title='install java on linux'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6646774356838558345</id><published>2009-01-13T22:11:00.001-08:00</published><updated>2009-01-13T22:30:04.473-08:00</updated><title type='text'>software raid in linux</title><content type='html'>&lt;div&gt;create raid:&lt;/div&gt;&lt;div&gt; mdadm --create --verbose  /dev/md0 --level=0 --raid-device=2 /dev/sda1 /dev/sdb1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stop raid:&lt;/div&gt;&lt;div&gt;&lt;div&gt;mdadm --manage --stop /dev/md0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6646774356838558345?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6646774356838558345/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6646774356838558345' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6646774356838558345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6646774356838558345'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2009/01/create-raid.html' title='software raid in linux'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1604568838523333017</id><published>2009-01-12T19:35:00.000-08:00</published><updated>2009-01-12T19:39:34.306-08:00</updated><title type='text'>inode</title><content type='html'>An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. An inode stores basic information about a regular file, directory, or other file system object.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;see inode number of a file:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;ex: ls  -i  test3.c&lt;/div&gt;&lt;div&gt;715775 test3.c&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;see info about the file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;ex: stat  test3.c&lt;/div&gt;&lt;div&gt;&lt;div&gt;File: `test3.c'&lt;/div&gt;&lt;div&gt;Size: 451       &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Blocks: 8          IO Block: 4096   regular file&lt;/div&gt;&lt;div&gt;Device: 303h/771d&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;Inode: 715775      Links: 1&lt;/div&gt;&lt;div&gt;Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)&lt;/div&gt;&lt;div&gt;Access: 2009-01-06 22:11:55.000000000 +0800&lt;/div&gt;&lt;div&gt;Modify: 2008-12-22 17:43:56.000000000 +0800&lt;/div&gt;&lt;div&gt;Change: 2008-12-22 17:43:56.000000000 +0800&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1604568838523333017?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1604568838523333017/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1604568838523333017' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1604568838523333017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1604568838523333017'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2009/01/inode.html' title='inode'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7844505466263188556</id><published>2009-01-12T19:33:00.001-08:00</published><updated>2009-01-12T19:33:50.750-08:00</updated><title type='text'>e2fsck</title><content type='html'>check file system&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;e2fsck  -f  /dev/sda2&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7844505466263188556?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7844505466263188556/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7844505466263188556' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7844505466263188556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7844505466263188556'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2009/01/e2fsck.html' title='e2fsck'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-827818983469259086</id><published>2009-01-12T19:25:00.000-08:00</published><updated>2009-01-12T19:29:16.757-08:00</updated><title type='text'>dumpe2fs</title><content type='html'>dump ext2/ext3 filesystem information&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ex:  &lt;/div&gt;&lt;div&gt;dumpe2fs  /dev/hda1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;mpe2fs 1.38 (30-Jun-2005)&lt;/div&gt;&lt;div&gt;Filesystem volume name:   /&lt;/div&gt;&lt;div&gt;Last mounted on:          &lt;not&gt;&lt;/div&gt;&lt;div&gt;Filesystem UUID:          1004b524-1c21-4829-bb94-0b5dada664c8&lt;/div&gt;&lt;div&gt;Filesystem magic number:  0xEF53&lt;/div&gt;&lt;div&gt;Filesystem revision #:    1 (dynamic)&lt;/div&gt;&lt;div&gt;Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file&lt;/div&gt;&lt;div&gt;Default mount options:    user_xattr acl&lt;/div&gt;&lt;div&gt;Filesystem state:         clean&lt;/div&gt;&lt;div&gt;Errors behavior:          Continue&lt;/div&gt;&lt;div&gt;Filesystem OS type:       Linux&lt;/div&gt;&lt;div&gt;Inode count:              2560864&lt;/div&gt;&lt;div&gt;Block count:              2560351&lt;/div&gt;&lt;div&gt;Reserved block count:     128017&lt;/div&gt;&lt;div&gt;Free blocks:              1215812&lt;/div&gt;&lt;div&gt;Free inodes:              2431393&lt;/div&gt;&lt;div&gt;First block:              0&lt;/div&gt;&lt;div&gt;Block size:               4096&lt;/div&gt;&lt;div&gt;Fragment size:            4096&lt;/div&gt;&lt;div&gt;Reserved GDT blocks:      625&lt;/div&gt;&lt;div&gt;Blocks per group:         32768&lt;/div&gt;&lt;div&gt;Fragments per group:      32768&lt;/div&gt;&lt;div&gt;Inodes per group:         32416&lt;/div&gt;&lt;div&gt;Inode blocks per group:   1013&lt;/div&gt;&lt;div&gt;Filesystem created:       Tue Aug  5 18:03:45 2008&lt;/div&gt;&lt;div&gt;Last mount time:          Thu Jan  1 05:36:59 2009&lt;/div&gt;&lt;div&gt;Last write time:          Thu Jan  1 09:26:35 2009&lt;/div&gt;&lt;div&gt;Mount count:              95&lt;/div&gt;&lt;div&gt;Maximum mount count:      -1&lt;/div&gt;&lt;div&gt;Last checked:             Tue Aug  5 18:03:45 2008&lt;/div&gt;&lt;div&gt;Check interval:           0 (&lt;none&gt;)&lt;/div&gt;&lt;div&gt;Reserved blocks uid:      0 (user root)&lt;/div&gt;&lt;div&gt;Reserved blocks gid:      0 (group root)&lt;/div&gt;&lt;div&gt;First inode:              11&lt;/div&gt;&lt;div&gt;Inode size:&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;  128&lt;/div&gt;&lt;div&gt;Journal inode:            8&lt;/div&gt;&lt;div&gt;Default directory hash:   tea&lt;/div&gt;&lt;div&gt;Directory Hash Seed:      2b724a84-72d7-4a1e-a4fb-e9d5d09e4581&lt;/div&gt;&lt;div&gt;Journal backup:           inode blocks&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Group 0: (Blocks 0-32767)&lt;/div&gt;&lt;div&gt;  Primary superblock at 0, Group descriptors at 1-1&lt;/div&gt;&lt;div&gt;  Reserved GDT blocks at 2-626&lt;/div&gt;&lt;div&gt;  Block bitmap at 627 (+627), Inode bitmap at 628 (+628)&lt;/div&gt;&lt;div&gt;  Inode table at 629-1641 (+629)&lt;/div&gt;&lt;div&gt;  0 free blocks, 32405 free inodes, 2 directories&lt;/div&gt;&lt;div&gt;  Free blocks: &lt;/div&gt;&lt;div&gt;  Free inodes: 12-32416&lt;/div&gt;&lt;div&gt;Group 1: (Blocks 32768-65535)&lt;/div&gt;&lt;div&gt;  Backup superblock at 32768, Group descriptors at 32769-32769&lt;/div&gt;&lt;div&gt;  Reserved GDT blocks at 32770-33394&lt;/div&gt;&lt;div&gt;  Block bitmap at 33395 (+627), Inode bitmap at 33396 (+628)&lt;/div&gt;&lt;div&gt;  Inode table at 33397-34409 (+629)&lt;/div&gt;&lt;div&gt;  29415 free blocks, 32416 free inodes, 0 directories&lt;/div&gt;&lt;div&gt;  Free blocks: 36121-65535&lt;/div&gt;&lt;div&gt;  Free inodes: 32417-64832&lt;/div&gt;&lt;div&gt;Group 2: (Blocks 65536-98303)&lt;/div&gt;&lt;div&gt;  Block bitmap at 65536 (+0), Inode bitmap at 65537 (+1)&lt;/div&gt;&lt;div&gt;  Inode table at 65538-66550 (+2)&lt;/div&gt;&lt;div&gt;  31746 free blocks, 32414 free inodes, 1 directories&lt;/div&gt;&lt;div&gt;  Free blocks: 66552-88063, 88069-96255, 96257-98303&lt;/div&gt;&lt;div&gt;  Free inodes: 64834, 64836-97248&lt;/div&gt;&lt;div&gt;Group 3: (Blocks 98304-131071)&lt;/div&gt;&lt;div&gt;  Backup superblock at 98304, Group descriptors at 98305-98305&lt;/div&gt;&lt;div&gt;  Reserved GDT blocks at 98306-98930&lt;/div&gt;&lt;div&gt;  Block bitmap at 98931 (+627), Inode bitmap at 98932 (+628)&lt;/div&gt;&lt;div&gt;  Inode table at 98933-99945 (+629)&lt;/div&gt;&lt;div&gt;  30813 free blocks, 32396 free inodes, 0 directories&lt;/div&gt;&lt;div&gt;  Free blocks: 99946-114687, 114689-122879, 123192-131071&lt;/div&gt;&lt;div&gt;  Free inodes: 97268, 97270-129664&lt;/div&gt;&lt;div&gt;Group 4: (Blocks 131072-163839)&lt;/div&gt;&lt;div&gt;  Block bitmap at 131072 (+0), Inode bitmap at 131073 (+1)&lt;/div&gt;&lt;div&gt;  Inode table at 131074-132086 (+2)&lt;/div&gt;&lt;div&gt;  31734 free blocks, 32416 free inodes, 0 directories&lt;/div&gt;&lt;div&gt;  Free blocks: 132088-151440, 151459-163839&lt;/div&gt;&lt;div&gt;  Free inodes: 129665-162080&lt;/div&gt;&lt;div&gt;Group 5: (Blocks 163840-196607)&lt;/div&gt;&lt;div&gt;  Backup superblock at 163840, Group descriptors at 163841-163841&lt;/div&gt;&lt;div&gt;  Reserved GDT blocks at 163842-164466&lt;/div&gt;&lt;div&gt;  Block bitmap at 164467 (+627), Inode bitmap at 164468 (+628)&lt;/div&gt;&lt;div&gt;  Inode table at 164469-165481 (+629)&lt;/div&gt;&lt;div&gt;  13148 free blocks, 30388 free inodes, 212 directories&lt;/div&gt;&lt;div&gt;  Free blocks: 165518-165522, 165524-165531, 165533-165535, 165537-165538, 165541-165546, 165548-165554, 165558-165562, 165573, 165576-165818, 165820-165887, 165891-167936, 167938, 167940-168618, 168807-168922, 169101-169226, 169381-169403, 169638-169760, 170300, 170390-170416, 170611-170692, 170695-170790, 170993-171100, 171288-171541, 171640-171760, 172077-172296, 172387-172655, 172733-174079, 174081-174083, 174085-176127, 176129, 176133-176135, 176150-176580, 176718-176829, 177002-177018, 177053-177117, 177286-177411, 177677-177699, 177748-177781, 177847-177969, 178312, 178467-178591, 178786-178863, 178996-179026, 179633-179735, 179834-179880, 179910-180006, 180224, 180531-180579, 180670-180752, 180773-180969, 180976-180997, 181028-181096, 181172-181280, 181518-181865, 182000-182061, 182216-182271, 182283, 184320, 184322, 186381, 189062, 189065, 189071-189098, 189311-189648, 189799-190039, 190297-190463, 190471, 190476-190639, 190705-190751, 190849-190909, 190920-191024, 191035-191661, 191672-191953, 191974-192124, 192183-192457, 193135, 193138-193154, 193533-193604, 193714-193800, 194381-194390, 194408-194427, 196328, 196459&lt;/div&gt;&lt;div&gt;  Free inodes: 164072, 164077, 164111-194496&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-827818983469259086?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/827818983469259086/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=827818983469259086' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/827818983469259086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/827818983469259086'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2009/01/dumpe2fs.html' title='dumpe2fs'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3117566460906192193</id><published>2008-12-22T18:35:00.001-08:00</published><updated>2008-12-22T18:35:27.716-08:00</updated><title type='text'>strace</title><content type='html'>trace system call and signals&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3117566460906192193?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3117566460906192193/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3117566460906192193' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3117566460906192193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3117566460906192193'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/strace.html' title='strace'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7988102353868725107</id><published>2008-12-22T18:20:00.000-08:00</published><updated>2009-06-10T18:28:34.314-07:00</updated><title type='text'>linux multipath</title><content type='html'>load driver:&lt;div&gt;&lt;div&gt;1. chkconfig boot.multipath on&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.chkconfig multipathd on&lt;/div&gt;&lt;div&gt;3. /etc/init.d/boot.multipath start&lt;/div&gt;&lt;div&gt;4. /etc/init.d/multipathd start&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;query multipath status:&lt;/div&gt;&lt;div&gt;multipath -l &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stop multipath service:&lt;/div&gt;&lt;div&gt;1. /etc/init.d/boot.multipath stop&lt;/div&gt;&lt;div&gt;2. /etc/init.d/multipathd stop&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/scsi_id.config:&lt;/div&gt;&lt;div&gt;the info related to multipath&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;how to decide multipath:&lt;/div&gt;&lt;div&gt;the sds with the same uuid are combined into a dm&lt;/div&gt;&lt;div&gt;scsi_id -g -s /block/sda can get uuid  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;for red hat:&lt;/div&gt;&lt;div&gt;default multipath is not triggered &lt;/div&gt;&lt;div&gt;modify /etc/multipath.conf :&lt;/div&gt;&lt;div&gt;comment blacklist&lt;/div&gt;&lt;div&gt;&lt;b&gt;remove dm:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;multipath -F&lt;/div&gt;&lt;div&gt;multipath stop&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7988102353868725107?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7988102353868725107/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7988102353868725107' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7988102353868725107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7988102353868725107'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/linux-multipath.html' title='linux multipath'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5047592006248127164</id><published>2008-12-17T17:53:00.000-08:00</published><updated>2008-12-17T19:44:05.575-08:00</updated><title type='text'>iometer</title><content type='html'>In windows : GUI&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In linux:  agent&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use windows iometer GUI to connect to linux iometer agent to get io information &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;run iometer agent in linux:&lt;/div&gt;&lt;div&gt;./dynamo -i windows_gui_ip  -m linux_agent_ip&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5047592006248127164?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5047592006248127164/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5047592006248127164' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5047592006248127164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5047592006248127164'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/iometer.html' title='iometer'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6429221038489434001</id><published>2008-12-15T03:51:00.000-08:00</published><updated>2009-02-10T22:36:45.921-08:00</updated><title type='text'>change log level &amp; enable sysrq</title><content type='html'>echo 9 &gt; /proc/sysrq-trigger&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;echo 1 &gt;  /proc/sys/kernel/sysrq&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;alt + sysrq  +  p :  show cpu info&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;alt + sysrq  + t : show current task list&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;alt  + sysrq  + m : show memory info&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6429221038489434001?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6429221038489434001/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6429221038489434001' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6429221038489434001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6429221038489434001'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/change-log-level.html' title='change log level &amp; enable sysrq'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-2722959381254710544</id><published>2008-12-15T03:46:00.000-08:00</published><updated>2008-12-15T03:51:10.379-08:00</updated><title type='text'>redirect output from serial port</title><content type='html'>1. modify bios:&lt;div&gt;   (1)Change BIOS settings /Server/Serial Console Features/BIOS Redirection Port to&lt;/div&gt;&lt;div&gt;       [Serial port 1 or 2]&lt;/div&gt;&lt;div&gt;   (2)change direct to modem &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.  modify /boot/grub/menu.lst for suse&lt;/div&gt;&lt;div&gt;     modify /boot/grub/grub.conf  for red hat&lt;/div&gt;&lt;div&gt;    console=ttyS0, 115200,vt100&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. modify /ect/inittab&lt;/div&gt;&lt;div&gt;    c0:2345:respawn:/sbin/agetty ttyS0 19200 vt100    &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. modify  /etc/securetty&lt;/div&gt;&lt;div&gt;    ttyS0&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-2722959381254710544?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/2722959381254710544/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=2722959381254710544' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2722959381254710544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2722959381254710544'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/redirect-output-from-serial-port.html' title='redirect output from serial port'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-9201437919830164296</id><published>2008-12-10T18:16:00.001-08:00</published><updated>2008-12-10T18:16:42.064-08:00</updated><title type='text'>How to Scan new LUNs on Linux with QLogic driver</title><content type='html'>&lt;a href="http://bash.cyberciti.biz/diskadmin/rescan-linux-scsi-bus/"&gt;http://bash.cyberciti.biz/diskadmin/rescan-linux-scsi-bus/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-9201437919830164296?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/9201437919830164296/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=9201437919830164296' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/9201437919830164296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/9201437919830164296'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/how-to-scan-new-luns-on-linux-with.html' title='How to Scan new LUNs on Linux with QLogic driver'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4207551023925557183</id><published>2008-12-10T00:59:00.000-08:00</published><updated>2008-12-10T01:00:35.811-08:00</updated><title type='text'>line number</title><content type='html'>nl: number lines&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4207551023925557183?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4207551023925557183/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4207551023925557183' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4207551023925557183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4207551023925557183'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/line-number.html' title='line number'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5292690368448518224</id><published>2008-12-09T03:56:00.001-08:00</published><updated>2008-12-09T03:56:46.099-08:00</updated><title type='text'>cpu info</title><content type='html'>cat /proc/cpuinfo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5292690368448518224?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5292690368448518224/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5292690368448518224' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5292690368448518224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5292690368448518224'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/cpu-info.html' title='cpu info'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5034291494546339270</id><published>2008-12-09T02:19:00.000-08:00</published><updated>2008-12-09T02:20:27.803-08:00</updated><title type='text'>interrupt context</title><content type='html'>1. can not relinquish cpu by calling sleep functions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5034291494546339270?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5034291494546339270/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5034291494546339270' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5034291494546339270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5034291494546339270'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/interrupt-context.html' title='interrupt context'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-555849816453267104</id><published>2008-12-09T02:13:00.000-08:00</published><updated>2008-12-09T02:15:34.614-08:00</updated><title type='text'>GFP_KERNEL</title><content type='html'>allocate memory:&lt;div&gt;1. GFP_KERNEL:&lt;/div&gt;&lt;div&gt;    kmalloc() is allowed to go to sleep and wait for pages to get freed up.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2.GFP_ATOMIC:&lt;/div&gt;&lt;div&gt;   Used by interrupt context code to get hold of memory. In this mode, kmalloc() is not allowed to    sleep-wait for free pages, so the probability of successful allocation with GFP_ATOMIC is lower    than with GFP_KERNEL.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-555849816453267104?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/555849816453267104/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=555849816453267104' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/555849816453267104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/555849816453267104'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/12/gfpkernel.html' title='GFP_KERNEL'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4290951521695910481</id><published>2008-11-16T22:46:00.001-08:00</published><updated>2009-01-12T19:58:09.500-08:00</updated><title type='text'>df</title><content type='html'>show disk space&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ex: df  -h:&lt;/div&gt;&lt;div&gt;&lt;div&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;/div&gt;&lt;div&gt;/dev/hda3             9.9G  7.0G  2.4G  75% /&lt;/div&gt;&lt;div&gt;udev                  8.0G  132K  8.0G   1% /dev&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4290951521695910481?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4290951521695910481/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4290951521695910481' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4290951521695910481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4290951521695910481'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/11/df.html' title='df'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6410136399394910320</id><published>2008-11-16T22:37:00.000-08:00</published><updated>2008-11-16T22:38:11.884-08:00</updated><title type='text'>objdump</title><content type='html'>show assembly of program:&lt;br /&gt;ex:&lt;br /&gt;&lt;br /&gt;objdump -D test.o&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6410136399394910320?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6410136399394910320/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6410136399394910320' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6410136399394910320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6410136399394910320'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/11/objdump.html' title='objdump'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1866433541886024252</id><published>2008-11-13T19:38:00.000-08:00</published><updated>2008-11-14T01:33:18.568-08:00</updated><title type='text'>fsck</title><content type='html'>check file system&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1866433541886024252?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1866433541886024252/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1866433541886024252' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1866433541886024252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1866433541886024252'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/11/fsck.html' title='fsck'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7044075247488073413</id><published>2008-10-30T00:38:00.000-07:00</published><updated>2008-10-30T01:54:08.288-07:00</updated><title type='text'>tethereal</title><content type='html'>ex:&lt;br /&gt;&lt;br /&gt;tethereal -i eth7 host 192.168.5.41 -V &gt; out&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7044075247488073413?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7044075247488073413/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7044075247488073413' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7044075247488073413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7044075247488073413'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/10/tethereal.html' title='tethereal'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-792601346747719544</id><published>2008-10-21T01:17:00.000-07:00</published><updated>2008-10-21T01:18:25.766-07:00</updated><title type='text'>AF_UNSPEC</title><content type='html'>ai_family = AF_UNSPEC;&lt;br /&gt;AF_UNSPEC: for IPv4 &amp; IPv6&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-792601346747719544?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/792601346747719544/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=792601346747719544' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/792601346747719544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/792601346747719544'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/10/afunspec.html' title='AF_UNSPEC'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-304181333817964017</id><published>2008-10-17T01:43:00.000-07:00</published><updated>2008-10-17T01:44:56.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux socket'/><title type='text'>accept</title><content type='html'>#include &lt;sys/types.h&gt;&lt;br /&gt;#include &lt;sys/socket.h&gt;&lt;br /&gt;int accept(int s, struct sockaddr *addr, socklen_t *addrlen);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;return:&lt;br /&gt;If successful, accept() returns a non-negative integer, which is a descriptor of the accepted socket.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-304181333817964017?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/304181333817964017/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=304181333817964017' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/304181333817964017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/304181333817964017'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/10/accept.html' title='accept'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4259588726667253694</id><published>2008-10-16T03:17:00.001-07:00</published><updated>2008-10-16T03:17:45.347-07:00</updated><title type='text'>chkconfig</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4259588726667253694?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4259588726667253694/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4259588726667253694' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4259588726667253694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4259588726667253694'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/10/chkconfig.html' title='chkconfig'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6886420034847514295</id><published>2008-10-16T02:56:00.001-07:00</published><updated>2008-10-16T02:56:36.659-07:00</updated><title type='text'>insserv</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6886420034847514295?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6886420034847514295/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6886420034847514295' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6886420034847514295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6886420034847514295'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/10/insserv.html' title='insserv'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7934729130037760680</id><published>2008-09-11T22:24:00.001-07:00</published><updated>2008-09-11T22:24:46.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>scsi_execute_req</title><content type='html'>&lt;div&gt;int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,&lt;/div&gt;&lt;div&gt;                     int data_direction, void *buffer, unsigned bufflen,&lt;/div&gt;&lt;div&gt;                     struct scsi_sense_hdr *sshdr, int timeout, int retries)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7934729130037760680?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7934729130037760680/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7934729130037760680' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7934729130037760680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7934729130037760680'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/scsiexecutereq.html' title='scsi_execute_req'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-229055878226216589</id><published>2008-09-11T19:40:00.000-07:00</published><updated>2008-09-11T19:42:24.626-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>scsi command code</title><content type='html'>include/scsi/scsi.h&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;READ_6   0x08&lt;/div&gt;&lt;div&gt;WRITE_6  0x0a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;READ_10   0x28&lt;/div&gt;&lt;div&gt;WRITE_10  0x2a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;READ_16   0x88&lt;/div&gt;&lt;div&gt;WRITE_16   0x8a&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-229055878226216589?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/229055878226216589/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=229055878226216589' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/229055878226216589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/229055878226216589'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/scsi-command-code.html' title='scsi command code'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8977082670404482892</id><published>2008-09-11T06:05:00.000-07:00</published><updated>2008-09-11T06:06:13.852-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>website about block driver</title><content type='html'>http://www.geocities.com/ravikiran_uvs/articles/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8977082670404482892?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8977082670404482892/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8977082670404482892' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8977082670404482892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8977082670404482892'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/website-about-block-driver.html' title='website about block driver'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1857666155361037059</id><published>2008-09-11T06:03:00.000-07:00</published><updated>2008-09-11T06:04:12.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>proc</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Courier; font-size: 17px; line-height: 27px; "&gt;read_proc&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Courier; font-size: 17px; line-height: 27px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Courier; font-size: 17px; line-height: 27px;"&gt;&lt;span class="Apple-style-span" style="font-family: courier; font-size: 20px; line-height: normal; "&gt;struct dentry *&lt;span style="font-weight: bold; "&gt;proc_lookup&lt;/span&gt;(struct inode * dir, struct dentry *dentry)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1857666155361037059?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1857666155361037059/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1857666155361037059' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1857666155361037059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1857666155361037059'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/proc.html' title='proc'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1702311705693739626</id><published>2008-09-10T10:01:00.000-07:00</published><updated>2008-09-10T10:03:33.128-07:00</updated><title type='text'>drivers/scsi/sd.c</title><content type='html'>the problem related to struct scsi_cmnd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1702311705693739626?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1702311705693739626/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1702311705693739626' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1702311705693739626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1702311705693739626'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/driversscsisdc.html' title='drivers/scsi/sd.c'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4896216750649522365</id><published>2008-09-09T09:25:00.000-07:00</published><updated>2008-09-09T09:26:32.483-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct scsi_cmnd</title><content type='html'>&lt;div&gt; /* These elements define the operation we are about to perform */&lt;/div&gt;&lt;div&gt; #define MAX_COMMAND_SIZE        16&lt;/div&gt;&lt;div&gt;  unsigned char cmnd[MAX_COMMAND_SIZE];&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4896216750649522365?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4896216750649522365/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4896216750649522365' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4896216750649522365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4896216750649522365'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/struct-scsicmnd.html' title='struct scsi_cmnd'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1533975493352493460</id><published>2008-09-08T02:55:00.000-07:00</published><updated>2008-09-08T02:57:01.155-07:00</updated><title type='text'>sd_mod</title><content type='html'>remove sd_mod will delete /dev/sd*&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1533975493352493460?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1533975493352493460/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1533975493352493460' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1533975493352493460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1533975493352493460'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/sdmod.html' title='sd_mod'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3544260922352009477</id><published>2008-09-04T02:14:00.000-07:00</published><updated>2008-09-04T02:15:50.013-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct scsi_sense_hdr</title><content type='html'>scsi_en.h&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;struct scsi_sense_hdr {         /* See SPC-3 section 4.5 */&lt;/div&gt;&lt;div&gt;          u8 response_code;       /* permit: 0x0, 0x70, 0x71, 0x72, 0x73 */&lt;/div&gt;&lt;div&gt;          u8 sense_key;&lt;/div&gt;&lt;div&gt;          u8 asc;&lt;/div&gt;&lt;div&gt;          u8 ascq;&lt;/div&gt;&lt;div&gt;          u8 byte4;&lt;/div&gt;&lt;div&gt;          u8 byte5;&lt;/div&gt;&lt;div&gt;          u8 byte6;&lt;/div&gt;&lt;div&gt;          u8 additional_length;   /* always 0 for fixed sense format */&lt;/div&gt;&lt;div&gt;  };&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3544260922352009477?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3544260922352009477/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3544260922352009477' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3544260922352009477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3544260922352009477'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/09/struct-scsisensehdr.html' title='struct scsi_sense_hdr'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6662827273367845181</id><published>2008-08-29T00:31:00.000-07:00</published><updated>2008-08-29T00:32:26.765-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>random number in driver</title><content type='html'>get_random_bytes():&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;&lt;div&gt;unsigned char uuid[16];&lt;/div&gt;&lt;div&gt;get_random_bytes(uuid, sizeof (uuid));&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6662827273367845181?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6662827273367845181/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6662827273367845181' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6662827273367845181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6662827273367845181'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/random-number-in-driver.html' title='random number in driver'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8330117793879345622</id><published>2008-08-28T20:13:00.000-07:00</published><updated>2008-08-28T20:31:32.009-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>type definition</title><content type='html'>struct block_device:&lt;div&gt;linux/fs.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;dev_t:&lt;/div&gt;&lt;div&gt;linux/types.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;struct page:&lt;/div&gt;&lt;div&gt;linux/mm_types.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;struct gendisk:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;linux/genhd.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;struct request_queue:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;linux/blkdev.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wait_queue_head_t:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;linux/wait.h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;spinlock_t:&lt;/div&gt;&lt;div&gt;linux/spinlock_types.h&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;struct semaphore:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;linux/semaphore.h&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8330117793879345622?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8330117793879345622/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8330117793879345622' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8330117793879345622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8330117793879345622'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/type-definition-for-block-driver.html' title='type definition'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-2959781437510450586</id><published>2008-08-21T01:56:00.000-07:00</published><updated>2008-08-21T01:57:00.672-07:00</updated><title type='text'>dmesg</title><content type='html'>/var/log/messages&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-2959781437510450586?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/2959781437510450586/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=2959781437510450586' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2959781437510450586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2959781437510450586'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/dmesg.html' title='dmesg'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3900841877963058328</id><published>2008-08-19T22:54:00.001-07:00</published><updated>2008-08-19T22:54:50.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux command'/><title type='text'>dhclient</title><content type='html'>get new ip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3900841877963058328?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3900841877963058328/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3900841877963058328' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3900841877963058328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3900841877963058328'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/dhclient.html' title='dhclient'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5261245314612000550</id><published>2008-08-19T00:38:00.000-07:00</published><updated>2008-08-20T18:57:58.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>dm</title><content type='html'>&lt;div&gt; &lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;//The request function that just remaps the bio built up by dm_merge_bvec&lt;/span&gt;&lt;/div&gt;&lt;div&gt;static int dm_request(struct request_queue *q, struct bio *bio)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;       call  __split_bio&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;// Split the bio into several clones.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;static int __split_bio(struct mapped_device *md, struct bio *bio)&lt;/div&gt;&lt;div&gt;       call  __clone_and_map with parameter ci&lt;/div&gt;&lt;div&gt;       ( ci.sector_count= bio_sectors(bio)  )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;static int __clone_and_map(struct clone_info *ci)&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;call  split_bvec&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5261245314612000550?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5261245314612000550/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5261245314612000550' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5261245314612000550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5261245314612000550'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/dm.html' title='dm'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8930462427588677717</id><published>2008-08-18T20:17:00.001-07:00</published><updated>2008-08-18T20:17:56.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>sector_t</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Helvetica; "&gt;&lt;pre class="done" id="14/1f/50486dbc9ca7a4c39897950c0afd3213c5e1_3/0" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; "&gt;typedef unsigned long &lt;a href="http://lxr.linux.no/linux+v2.6.26.2/include/linux/+code=sector_t" class="sref"&gt;sector_t&lt;/a&gt;;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8930462427588677717?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8930462427588677717/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8930462427588677717' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8930462427588677717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8930462427588677717'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/sectort.html' title='sector_t'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4411268860747632383</id><published>2008-08-17T23:17:00.001-07:00</published><updated>2008-08-17T23:17:48.187-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux command'/><title type='text'>mkfs</title><content type='html'>create filesystem&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;mkfs -v  /dev/hda3&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4411268860747632383?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4411268860747632383/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4411268860747632383' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4411268860747632383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4411268860747632383'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/mkfs.html' title='mkfs'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5675202087973601078</id><published>2008-08-17T19:28:00.000-07:00</published><updated>2008-08-18T23:53:03.147-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct bio</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;struct bio&lt;/span&gt;:&lt;div&gt;struct block_device  *bi_bdev;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;struct bio_vec          *bi_io_vec;     /* the actual vec list */&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;unsigned short          bi_vcnt;        /* how many bio_vec's */&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;unsigned int            bi_size;        /* residual I/O count */&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;struct bio_vec:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Helvetica;"&gt;&lt;pre class="done" id="b3/8a/cb23498bceea2541d16ff1d5c51ece59663a_3/0" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; "&gt;  struct &lt;a href="http://lxr.linux.no/linux+v2.6.26.2/include/linux/+code=page" class="sref"&gt;page&lt;/a&gt;     *&lt;a href="http://lxr.linux.no/linux+v2.6.26.2/include/linux/+code=bv_page" class="sref"&gt;bv_page&lt;/a&gt;;&lt;/pre&gt;&lt;pre class="done" id="b3/8a/cb23498bceea2541d16ff1d5c51ece59663a_3/0" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; "&gt;  unsigned int    &lt;a href="http://lxr.linux.no/linux+v2.6.26.2/include/linux/+code=bv_len" class="sref"&gt;bv_len&lt;/a&gt;;&lt;/pre&gt;&lt;pre class="done" id="b3/8a/cb23498bceea2541d16ff1d5c51ece59663a_3/0" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; "&gt;  unsigned int    &lt;a href="http://lxr.linux.no/linux+v2.6.26.2/include/linux/+code=bv_offset" class="sref"&gt;bv_offset&lt;/a&gt;;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5675202087973601078?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5675202087973601078/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5675202087973601078' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5675202087973601078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5675202087973601078'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/struct-bio.html' title='struct bio'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4934328146222654467</id><published>2008-08-17T18:50:00.000-07:00</published><updated>2008-08-17T19:02:26.532-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>do I/O without request queue</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;div&gt;three steps:&lt;/div&gt;1. define a make_request function&lt;/span&gt;&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;&lt;div&gt;static int sbull_make_request(request_queue_t *q, struct bio *bio) &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;     in the make_request function, transfer bio &amp;amp; call bio_endio(struct bio *bio, unsigned int bytes, int error) to signal completion &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;2. use blk_alloc_queue(GFP_KERNEL) to allocate a queue &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;3. call blk_queue_make_request(request_queue_t *queue, make_request_fn *func)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;when make_request function return non-zero:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;the bio is submitted again. Hence, we can modify bi_bdev &amp;amp; starting sector to redirect bio to another device&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;split bio into multiple chunks:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;bio_split&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4934328146222654467?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4934328146222654467/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4934328146222654467' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4934328146222654467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4934328146222654467'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/do-io-without-request-queue.html' title='do I/O without request queue'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8430079867080627007</id><published>2008-08-17T10:07:00.000-07:00</published><updated>2008-08-17T10:16:23.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>kthread</title><content type='html'>show kthread list&lt;div&gt;ps  -ef&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8430079867080627007?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8430079867080627007/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8430079867080627007' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8430079867080627007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8430079867080627007'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/kthread.html' title='kthread'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3940475646864664662</id><published>2008-08-16T09:56:00.000-07:00</published><updated>2008-08-16T09:58:34.812-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>interrupt</title><content type='html'>prevent interrupt entering critical section &lt;div&gt;method 1:&lt;/div&gt;&lt;div&gt;&lt;div&gt; local_irq_disable();  /* Disable Interrupts in local CPU */&lt;/div&gt;&lt;div&gt;  /* ... Critical Section ...  */&lt;/div&gt;&lt;div&gt;  local_irq_enable();   /* Enable Interrupts in local CPU */&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;method 2:&lt;/div&gt;&lt;div&gt;&lt;div&gt;unsigned long flags;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Point A:&lt;/div&gt;&lt;div&gt;  local_irq_save(flags);     /* Disable Interrupts */&lt;/div&gt;&lt;div&gt;  /* ... Critical Section ... */&lt;/div&gt;&lt;div&gt;  local_irq_restore(flags);  /* Restore state to what it was at point A */&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3940475646864664662?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3940475646864664662/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3940475646864664662' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3940475646864664662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3940475646864664662'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/interrupt.html' title='interrupt'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4575865283560615510</id><published>2008-08-16T09:45:00.000-07:00</published><updated>2008-08-16T09:51:44.218-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>spinlock &amp; mutex</title><content type='html'>&lt;div&gt;spinlock ensures only one thread can enter critical section&lt;/div&gt;spinlock example:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;#include &lt;linux/spinlock.h&gt;&lt;/linux/spinlock.h&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;spinlock_t mylock = SPIN_LOCK_UNLOCKED; /* Initialize */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;/* Acquire the spinlock. This is inexpensive if there&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; * is no one inside the critical section. In the face of&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; * contention, spinlock() has to busy-wait.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;spin_lock(&amp;amp;mylock);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;/* ... Critical Section code ... */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;spin_unlock(&amp;amp;mylock); /* Release the lock */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;spinlock will busy-wait,  mutex will sleep&lt;/div&gt;&lt;div&gt;mutex example:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;#include &lt;linux/mutex.h&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;/* Statically declare a mutex. To dynamically&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;   create a mutex, use mutex_init() */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;static DEFINE_MUTEX(mymutex);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;/* Acquire the mutex. This is inexpensive if there&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; * is no one inside the critical section. In the face of&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; * contention, mutex_lock() puts the calling thread to sleep.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt; */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;mutex_lock(&amp;amp;mymutex);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;/* ... Critical Section code ... */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;mutex_unlock(&amp;amp;mymutex);      /* Release the mutex */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4575865283560615510?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4575865283560615510/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4575865283560615510' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4575865283560615510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4575865283560615510'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/spinlock-mutex.html' title='spinlock &amp; mutex'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1146748124487531513</id><published>2008-08-16T01:24:00.000-07:00</published><updated>2008-08-16T01:27:42.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>linux開機設定</title><content type='html'>GRUB:&lt;div&gt;/boot/grub/grub.conf  or /boot/grub/menu.lst&lt;/div&gt;&lt;div&gt;grub.conf example:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;default 0  #Boot the 2.6.23 kernel by default&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;timeout 5  #5 second to alter boot order or parameters&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;title kernel 2.6.23     #Boot Option 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  #The boot image resides in the first partition of the first disk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  #under the /boot/ directory and is named vmlinuz-2.6.23. 'ro'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  #indicates that the root partition should be mounted read-only.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  kernel (hd0,0)/boot/vmlinuz-2.6.23 ro root=/dev/hda1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  #Look under section "Freeing initrd memory:387k freed"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;  initrd (hd0,0)/boot/initrd&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;#...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;LILO:&lt;/div&gt;&lt;div&gt;/etc/lilo.conf&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1146748124487531513?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1146748124487531513/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1146748124487531513' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1146748124487531513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1146748124487531513'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/linux.html' title='linux開機設定'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8592927422297188741</id><published>2008-08-16T01:10:00.000-07:00</published><updated>2008-08-29T00:01:44.137-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>compile driver</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;method 1:&lt;/span&gt;&lt;div&gt;Makefile:&lt;/div&gt;&lt;div&gt;      obj-m+=test.ko&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;make -C /usr/src/kernels/x.y.z/  M=`pwd`  modules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8592927422297188741?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8592927422297188741/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8592927422297188741' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8592927422297188741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8592927422297188741'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/compile-driver.html' title='compile driver'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-2218130344791439134</id><published>2008-08-16T00:59:00.000-07:00</published><updated>2008-08-16T01:02:14.434-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>kernel source module</title><content type='html'>compile module:&lt;div&gt;1. cd  /usr/src/linux-x.y.z/&lt;/div&gt;&lt;div&gt;2. make modules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;install module&lt;/div&gt;&lt;div&gt;1.  make modules_install&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;the generated module( ko)  is stored in /lib/modules/x.y.z/kernel/ &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-2218130344791439134?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/2218130344791439134/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=2218130344791439134' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2218130344791439134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/2218130344791439134'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/kernel-source-module.html' title='kernel source module'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1530419512829763256</id><published>2008-08-15T09:53:00.000-07:00</published><updated>2008-08-15T10:04:48.496-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>patch</title><content type='html'>&lt;span class="Apple-style-span"  style="  ;font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;A patch is a text file containing source code differences between a development tree and the original snapshot from which the developer started work&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; "&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;apply patch:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;ex:  if x.y.z-mm2.bz2 is a patch, go to the directory of linux source&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;      bzip2  -dc  ../x.y.z-mm2.bz2 |  patch -p1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;create patch:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;ex:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana;"&gt;diff  -Nur   /path/originalKernal/    /path/newKernel  &gt;  change changes.patch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: verdana; font-size: 48px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1530419512829763256?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1530419512829763256/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1530419512829763256' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1530419512829763256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1530419512829763256'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/patch.html' title='patch'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7883051730188092926</id><published>2008-08-15T02:14:00.000-07:00</published><updated>2008-08-15T02:16:33.777-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux software'/><title type='text'>global code browser</title><content type='html'>install:&lt;div&gt;http://www.gnu.org/software/global/global.html&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;run:&lt;/div&gt;&lt;div&gt;1. go to directory of source code&lt;/div&gt;&lt;div&gt;2. gtags&lt;/div&gt;&lt;div&gt;3. htags  ./codeTrace/&lt;/div&gt;&lt;div&gt;the generated html is in ./codeTrace/&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7883051730188092926?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7883051730188092926/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7883051730188092926' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7883051730188092926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7883051730188092926'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/global-code-browser.html' title='global code browser'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-489491748596203384</id><published>2008-08-13T20:16:00.000-07:00</published><updated>2008-08-13T20:17:40.209-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux command'/><title type='text'>find command</title><content type='html'>find  .  -name  "test.txt"&lt;div&gt;find text.txt under current directory&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-489491748596203384?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/489491748596203384/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=489491748596203384' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/489491748596203384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/489491748596203384'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/find-command.html' title='find command'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3514553733999587810</id><published>2008-08-13T20:15:00.000-07:00</published><updated>2008-08-13T20:16:44.686-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>linux module location</title><content type='html'>/lib/modules/2.6.18-92.el5/kernel/drivers&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3514553733999587810?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3514553733999587810/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3514553733999587810' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3514553733999587810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3514553733999587810'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/linux-module-location.html' title='linux module location'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1344999165068388909</id><published>2008-08-12T02:24:00.000-07:00</published><updated>2008-08-16T09:35:17.464-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>HZ &amp;  jiffies</title><content type='html'>HZ是用來定義每一秒有幾次timer interrupts(time tick)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;jiffies:&lt;/div&gt;&lt;div&gt;the number of time ticks since kernel start&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;unsigned long timeout=jiffies+ 3*HZ;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;//  the time after 3 second&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;time_after(jiffies, timeout)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;convert from jiffies to seconds&lt;/span&gt;&lt;/div&gt;&lt;div&gt;divide by HZ&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;time related methods:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;time_after:  parameter is time tick &lt;/div&gt;&lt;div&gt;time_before: parameter is time tick&lt;/div&gt;&lt;div&gt;schedule_timeout: parameter is time tick  &lt;/div&gt;&lt;div&gt;only schedule_timeout will give up processor&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;wait_event_timeout:&lt;/div&gt;&lt;div&gt;msleep: parameter is milliseconds&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;timer example( do something in the future):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;#include &lt;linux/timer.h&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;struct timer_list my_timer;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;init_timer(&amp;amp;my_timer);            /* Also see setup_timer() */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;my_timer.expire = jiffies + n*HZ; /* n is the timeout in number&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;                                     of seconds */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;my_timer.function = timer_func;   /* Function to execute&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;                                     after n seconds */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;my_timer.data = func_parameter;   /* Parameter to be passed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;                                     to timer_func */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;add_timer(&amp;amp;my_timer);             /* Start the timer */&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1344999165068388909?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1344999165068388909/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1344999165068388909' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1344999165068388909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1344999165068388909'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/hz-jiffies.html' title='HZ &amp;  jiffies'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6101054892798127839</id><published>2008-08-10T23:20:00.000-07:00</published><updated>2008-08-10T23:21:00.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>smp</title><content type='html'>smp(多cpu)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6101054892798127839?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6101054892798127839/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6101054892798127839' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6101054892798127839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6101054892798127839'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/smp.html' title='smp'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5634006129825470098</id><published>2008-08-08T01:37:00.000-07:00</published><updated>2008-12-01T22:30:20.930-08:00</updated><title type='text'>rpm</title><content type='html'>&lt;div&gt;remove rpm:&lt;/div&gt;&lt;div&gt;rpm -e test&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;query info about specific rpm&lt;div&gt;ex: &lt;/div&gt;&lt;div&gt;rpm -q  test&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5634006129825470098?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5634006129825470098/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5634006129825470098' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5634006129825470098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5634006129825470098'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/rpm.html' title='rpm'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-706227739726527881</id><published>2008-08-07T20:25:00.000-07:00</published><updated>2008-08-07T20:26:23.079-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux software'/><title type='text'>rpm for red hat and cent os</title><content type='html'>Because red hat &amp;amp; cent os are related , we can get rpm for ret hat from rpm for cent os &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-706227739726527881?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/706227739726527881/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=706227739726527881' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/706227739726527881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/706227739726527881'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/rpm-for-red-hat-and-cent-os.html' title='rpm for red hat and cent os'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5978212783041198306</id><published>2008-08-07T00:51:00.000-07:00</published><updated>2008-08-07T00:53:06.288-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux network'/><title type='text'>init network</title><content type='html'>開機網路設定:&lt;div&gt;/etc/sysconfig/network/&lt;/div&gt;&lt;div&gt;ifcfg-lo&lt;/div&gt;&lt;div&gt;ifcfg-eth0&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5978212783041198306?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5978212783041198306/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5978212783041198306' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5978212783041198306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5978212783041198306'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/init-network.html' title='init network'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8805962108994040644</id><published>2008-08-06T00:15:00.000-07:00</published><updated>2008-08-06T00:21:13.968-07:00</updated><title type='text'>blk_queue_make_request</title><content type='html'>&lt;span class="Apple-style-span" style="color: rgb(17, 17, 17);  line-height: 23px; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); line-height: normal; "&gt;&lt;code class="FUNCDEF"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;void blk_queue_make_request &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;(request_queue_t * q, make_request_fn * mfn);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(17, 17, 17); line-height: 23px; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(17, 17, 17);  line-height: 23px; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;define an alternate make_request function for a device&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(17, 17, 17);  line-height: 23px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color: rgb(17, 17, 17);  line-height: 23px;font-family:sans;"&gt;&lt;span class="Apple-style-span"  style="color: rgb(0, 0, 0);  font-family:Sans;"&gt;&lt;h2 style="margin-top: 10px; margin-bottom: 0px; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;ARGUMENTS&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;blockquote style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 25px; font-family: sans; font-size: 1em; border-left-style: none; border-left-width: initial; border-left-color: initial; color: rgb(17, 17, 17); "&gt;&lt;p style="margin-top: 0px; margin-bottom: 10px; "&gt;&lt;u style="font-style: italic; text-decoration: none; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;q&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/p&gt;&lt;blockquote style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 25px; border-left-style: none; border-left-width: initial; border-left-color: initial; color: rgb(17, 17, 17); "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;the request queue for the device to be affected&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;u style="font-style: italic; text-decoration: none; "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;mfn&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;blockquote style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 25px; border-left-style: none; border-left-width: initial; border-left-color: initial; color: rgb(17, 17, 17); "&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;the alternate make_request function&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8805962108994040644?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8805962108994040644/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8805962108994040644' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8805962108994040644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8805962108994040644'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/08/blkqueuemakerequest.html' title='blk_queue_make_request'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-8134866006008374189</id><published>2008-07-28T23:59:00.001-07:00</published><updated>2008-09-10T00:00:20.512-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>linux driver command</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;lsmod &lt;/span&gt;&lt;/div&gt;&lt;div&gt;顯示目前已經載入的模組清單&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;insmod &lt;/span&gt;&lt;/div&gt;&lt;div&gt;load module into kernel&lt;/div&gt;&lt;div&gt;ex: insmod hello.ko&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;rmmod:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;remove module&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;modprobe:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;like insmod,  but also install dependent modules&lt;/div&gt;&lt;div&gt;(the module dependency is stored in /lib/modules/x.y.z/modules.dep)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;modprobe -r:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;remove module&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;modinfo:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;show module info&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-8134866006008374189?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/8134866006008374189/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=8134866006008374189' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8134866006008374189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/8134866006008374189'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/07/linux-driver-command.html' title='linux driver command'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-450661864184516859</id><published>2008-07-28T18:40:00.000-07:00</published><updated>2008-07-31T23:13:05.102-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux software'/><title type='text'>linux kernel version</title><content type='html'>&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Georgia;"&gt;&lt;span class="Apple-style-span"  style=" ;font-family:arial;"&gt;red hat enterprise linux 4 update 4&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style=" ;font-family:arial;"&gt;core_2.6.9-42.EL_i686  &amp;amp;  core_2.6.9-42.ELsmp_i686,  core_2.6.9-42.ELsmp_x86_64,  core_2.6.9-42.EL_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;red hat enterprise linux 5 update 1&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style="  ;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="  ;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.18-53.el5_i686  &amp;amp;  core_2.6.18-53.el5_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;red hat enterprise linux 5 update 2&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.18-92.el5_i686  &amp;amp;  core_2.6.18-92.el5_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;suse linux enterprise server 9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Lucida Grande'; "&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.5-7.244-smp_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal 'Lucida Grande'; "&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" ;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;suse linux enterprise server 10 &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:'Lucida Grande';font-size:12px;"&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.16.21-0.8-smp_i686  &amp;amp; core_2.6.16.21-0.8-smp_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;suse linux enterprise server 10 sp1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.16.46-0.12-smp_x86_64  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;suse linux enterprise server 10 sp2&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;span class="Apple-style-span" style=" "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Lucida Grande"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;core_2.6.16.60-0.21-default_i686   ,core_2.6.16.60-0.21-default_x86_64&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-450661864184516859?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/450661864184516859/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=450661864184516859' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/450661864184516859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/450661864184516859'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/07/linux-kernel-version.html' title='linux kernel version'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4203355729456555025</id><published>2008-07-25T01:51:00.000-07:00</published><updated>2008-07-25T04:15:14.508-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux software'/><title type='text'>LVM</title><content type='html'>(1) 實體磁碟 --&gt; PV( physical volume)&lt;br /&gt;&lt;div&gt;1. change id to 8e&lt;/div&gt;&lt;div&gt;ex:&lt;/div&gt;&lt;div&gt;   (a) fdisk  /dev/hda&lt;/div&gt;&lt;div&gt;   (b) p&lt;/div&gt;&lt;div&gt;         show information of hda&lt;/div&gt;&lt;div&gt;   (c)  t --&gt;  1 --&gt; 8e&lt;/div&gt;&lt;div&gt;        modify partition 1 's id to 8e&lt;/div&gt;&lt;div&gt;   (d) w&lt;/div&gt;&lt;div&gt;         alter partition table&lt;/div&gt;&lt;div&gt;   (e) partprobe&lt;/div&gt;&lt;div&gt;         let kernel read newest partition table&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. create pv  &lt;/div&gt;&lt;div&gt;   (a)pvscan:&lt;/div&gt;&lt;div&gt;        show information of pv&lt;/div&gt;&lt;div&gt;   (b)pvcreate &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4203355729456555025?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4203355729456555025/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4203355729456555025' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4203355729456555025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4203355729456555025'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/07/lvm.html' title='LVM'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-622230145237588061</id><published>2008-06-04T01:59:00.000-07:00</published><updated>2008-06-04T02:03:17.607-07:00</updated><title type='text'>x11</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;設定開機進入X11&lt;/span&gt;&lt;div&gt;edit /etc/inittab&lt;/div&gt;&lt;div&gt;id:3:initdefault:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;設定開機進入文字介面:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;edit /etc/inittab&lt;/div&gt;&lt;div&gt;id:5:initdefault:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;x11 problem:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;method 1:&lt;/div&gt;&lt;div&gt;edit /etc/X11/xorg.conf&lt;/div&gt;&lt;div&gt;defaultdepth =8&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-622230145237588061?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/622230145237588061/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=622230145237588061' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/622230145237588061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/622230145237588061'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/06/x11.html' title='x11'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3998589222908582370</id><published>2008-06-03T00:21:00.000-07:00</published><updated>2008-06-03T00:31:21.507-07:00</updated><title type='text'>iscsi-initiator-utils</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;start:&lt;/span&gt;&lt;div&gt;&lt;div&gt;/etc/init.d/iscsi start&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;discovery lun&lt;/span&gt;&lt;/div&gt;&lt;div&gt;iscsiadm -m discovery -t sendtargets -p 192.168.5.122&lt;/div&gt;&lt;div&gt;192.168.5.122 is lun's ip&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/init.d/iscsi restart&lt;br /&gt;&lt;/div&gt;&lt;div&gt;connect to the lun 192.168.5.122,  there is a new disk , sdd( use fdisk -l to show)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Format &amp;amp; mount&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;fdisk /dev/sdd&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;mke2fs -j -m 0 -O dir_index /dev/sdd1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;mkdir /mnt/iscsi&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;mount /dev/sdd1 /mnt/iscsi&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3998589222908582370?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3998589222908582370/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3998589222908582370' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3998589222908582370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3998589222908582370'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/06/iscsi-initiator-utils.html' title='iscsi-initiator-utils'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7186975156027129788</id><published>2008-06-02T23:37:00.000-07:00</published><updated>2008-06-02T23:40:36.384-07:00</updated><title type='text'>yum</title><content type='html'>設定search path&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/yum.conf:&lt;/div&gt;&lt;div&gt;&lt;div&gt;[main]&lt;/div&gt;&lt;div&gt;cachedir=/var/cache/yum&lt;/div&gt;&lt;div&gt;debuglevel=2&lt;/div&gt;&lt;div&gt;logfile=/var/log/yum.log&lt;/div&gt;&lt;div&gt;pkgpolicy=newest&lt;/div&gt;&lt;div&gt;distroverpkg=redhat-release&lt;/div&gt;&lt;div&gt;tolerant=1&lt;/div&gt;&lt;div&gt;exactarch=1&lt;/div&gt;&lt;div&gt;bsoletes=1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# PUT YOUR REPOS HERE OR IN separate files named file.repo&lt;/div&gt;&lt;div&gt;# in /etc/yum.repos.d&lt;/div&gt;&lt;div&gt;#[base]&lt;/div&gt;&lt;div&gt;#name=Red Hat Linux $releasever - $basearch - Base&lt;/div&gt;&lt;div&gt;#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#[updates]&lt;/div&gt;&lt;div&gt;#name=Red Hat Linux $releasever - Updates&lt;/div&gt;&lt;div&gt;#baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/$releasever/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[dag]&lt;/div&gt;&lt;div&gt;name=Dag RPM Repository for Red Hat Enterprise Linux&lt;/div&gt;&lt;div&gt;baseurl=http://apt.sw.be/redhat/el4/en/i386/dag/&lt;/div&gt;&lt;div&gt;gpgcheck=1&lt;/div&gt;&lt;div&gt;enabled=1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[freshrpms]&lt;/div&gt;&lt;div&gt;name=FreshRPMs&lt;/div&gt;&lt;div&gt;baseurl=http://dag.freshrpms.net/redhat/el4/en/i386/dag/&lt;/div&gt;&lt;div&gt;gpgcheck=1&lt;/div&gt;&lt;div&gt;enabled=1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[rpmfind]&lt;/div&gt;&lt;div&gt;name=RPMFind.net&lt;/div&gt;&lt;div&gt;baseurl=http://rpmfind.net/linux/dag/redhat/el4/en/i386/dag/&lt;/div&gt;&lt;div&gt;gpgcheck=1&lt;/div&gt;&lt;div&gt;enabled=1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[pdx.edu]&lt;/div&gt;&lt;div&gt;name=PDX.edu&lt;/div&gt;&lt;div&gt;baseurl=http://mirrors.cat.pdx.edu/dag/redhat/el4/en/i386/dag/&lt;/div&gt;&lt;div&gt;gpgcheck=1&lt;/div&gt;&lt;div&gt;enabled=1&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7186975156027129788?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7186975156027129788/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7186975156027129788' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7186975156027129788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7186975156027129788'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/06/yum.html' title='yum'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3540701327670532988</id><published>2008-06-02T20:45:00.000-07:00</published><updated>2008-11-27T19:05:28.223-08:00</updated><title type='text'>Open-iSCSI</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;install  2.0-869.2&lt;/span&gt;&lt;div&gt;make&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;start:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;rcopen-iscsi start&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;discovery:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=""&gt;iscsiadm -m discovery  -t st -p 192.168.4.123 &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;update chap information:&lt;span class="Apple-style-span"   style="  font-weight: normal; white-space: pre; font-family:Courier;font-size:14px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"   style="  font-weight: normal; white-space: pre; font-family:Courier;font-size:14px;"&gt;iscsiadm -m node -p 192.168.4.123 --op=update \   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"   style="  font-weight: normal; white-space: pre; font-family:Courier;font-size:14px;"&gt;  --name=node.session.auth.authmethod --value=CHAP&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Verdana;font-size:14px;"&gt;&lt;pre class="screen"&gt;iscsiadm -m node -p 192.168.4.123 --op=update \     --name=node.session.auth.username --value=andy&lt;/pre&gt;&lt;pre class="screen"&gt;iscsiadm -m node -p 192.168.4.123 --op=update \     --name=node.session.auth.password --value=1234&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;login:&lt;/span&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;iscsiadm -m node -p 192.168.4.123 -l&lt;/pre&gt;&lt;pre class="screen"&gt;or&lt;/pre&gt;&lt;pre class="screen"&gt;iscsiadm -m node -r nodeId -l&lt;/pre&gt;&lt;pre class="screen"&gt;the disk added after login is in /dev/sd*&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;delete record:&lt;/span&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;iscsiadm -m node -o delete&lt;/pre&gt;&lt;pre class="screen"&gt;or&lt;/pre&gt;&lt;pre class="screen"&gt;rm -rf /etc/iscsi/nodes/*&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;logout &lt;/span&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;iscsiadm -m node -U all&lt;/pre&gt;&lt;pre class="screen"&gt;daemon:&lt;/pre&gt;&lt;pre class="screen"&gt;/etc/init.d/iscsi&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;increase iscsi ping time to prevent a lot of io error messages&lt;/span&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;node.conn[0].timeo.noop_out_interval = X&lt;br /&gt;&lt;/pre&gt;&lt;pre class="screen"&gt;ode.conn[0].timeo.noop_out_timeout = X&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3540701327670532988?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3540701327670532988/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3540701327670532988' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3540701327670532988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3540701327670532988'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/06/open-iscsi.html' title='Open-iSCSI'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6693461166227954539</id><published>2008-05-07T19:31:00.000-07:00</published><updated>2008-05-07T19:32:09.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>open_by_devnum</title><content type='html'>struct block_device *open_by_devnum(dev_t dev, unsigned mode)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6693461166227954539?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6693461166227954539/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6693461166227954539' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6693461166227954539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6693461166227954539'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/openbydevnum.html' title='open_by_devnum'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7860097098510421051</id><published>2008-05-07T18:41:00.000-07:00</published><updated>2008-08-19T23:32:20.515-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct bio</title><content type='html'>&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;struct bio {&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    sector_t             bi_sector;  //  beginning sector&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    struct bio          *bi_next;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    struct block_device *bi_bdev;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    unsigned short       bi_vcnt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    unsigned short       bi_idx;  //  an offset into the bi_io_vec array&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    struct bio_vec      *bi_io_vec;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;    ...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="border-collapse: collapse;  font-family:song;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7860097098510421051?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7860097098510421051/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7860097098510421051' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7860097098510421051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7860097098510421051'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/struct-bio.html' title='struct bio'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7293589280524217140</id><published>2008-05-07T01:58:00.000-07:00</published><updated>2008-05-07T04:08:17.587-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>generic_make_request</title><content type='html'>&lt;span class="Apple-style-span"  style=" ;font-family:Courier;"&gt;&lt;code class="FUNCDEF"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;void generic_make_request &lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;(struct bio * bio);&lt;span class="Apple-style-span"   style="  font-weight: normal; font-family:Times;font-size:19px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" font-weight: bold;font-family:Courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Courier;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"   style="  font-weight: normal; font-family:Times;font-size:19px;"&gt;make I/O requests of block devices. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:Courier;"&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"   style="  font-weight: normal; font-family:Times;font-size:19px;"&gt;It is passed a &amp;amp;struct bio, which describes the I/O that needs to be done.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:Times;font-size:19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:Times;font-size:19px;"&gt;the success/failure status of the request, along with notification of completion,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:Times;font-size:19px;"&gt;is delivered asynchronously through the bio-&gt;bi_end_io function&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times; font-size: 48px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;The caller of generic_make_request must make sure that bi_io_vec are set to describe the memory buffer, and that bi_dev and bi_sector are set to describe the device address, and the bi_end_io and optionally bi_private are set to describe how completion notification should be signaled.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7293589280524217140?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7293589280524217140/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7293589280524217140' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7293589280524217140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7293589280524217140'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/genericmakerequest.html' title='generic_make_request'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-373051126945237458</id><published>2008-05-06T20:40:00.000-07:00</published><updated>2008-05-06T20:44:18.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>MKDEV</title><content type='html'>dev_t  a=  MKDEV( int major, int minor )&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;get major &amp;amp; minor&lt;/div&gt;&lt;div&gt;MIJOR( a )  &amp;amp;  MINOR( a)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-373051126945237458?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/373051126945237458/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=373051126945237458' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/373051126945237458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/373051126945237458'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/mkdev.html' title='MKDEV'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4010796971065895484</id><published>2008-05-06T20:09:00.000-07:00</published><updated>2008-05-06T20:28:43.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct gendisk</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;int major&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;int  first_minor&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        first minor number associated with disk&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;int  minors&lt;/span&gt;&lt;/div&gt;&lt;div&gt;       range of minor numbers associated with disk. It control disk's max partition number &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;char  disk_name[32]&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4010796971065895484?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4010796971065895484/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4010796971065895484' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4010796971065895484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4010796971065895484'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/struct-gendisk.html' title='struct gendisk'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3919203667310826498</id><published>2008-05-06T18:55:00.000-07:00</published><updated>2008-05-06T20:03:01.534-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>struct gendisk *alloc_disk(int minors)</title><content type='html'>allocate gendisk &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3919203667310826498?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3919203667310826498/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3919203667310826498' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3919203667310826498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3919203667310826498'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/struct-gendisk-allocdiskint-minors.html' title='struct gendisk *alloc_disk(int minors)'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-7919874082250571081</id><published>2008-05-06T04:33:00.001-07:00</published><updated>2008-05-06T04:33:53.024-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>system_utsname</title><content type='html'>&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-7919874082250571081?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/7919874082250571081/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=7919874082250571081' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7919874082250571081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/7919874082250571081'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/systemutsname.html' title='system_utsname'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1212034110558764706</id><published>2008-05-06T04:20:00.000-07:00</published><updated>2008-05-06T04:22:28.961-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>add_disk</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Times; font-size: 19px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;void add_disk(struct gendisk *disk);&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;add the disk to the list of active disks&lt;/pre&gt;&lt;pre&gt;the disk is active now&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1212034110558764706?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1212034110558764706/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1212034110558764706' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1212034110558764706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1212034110558764706'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/adddisk.html' title='add_disk'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5023099605827657213</id><published>2008-05-06T02:18:00.000-07:00</published><updated>2008-05-06T02:32:46.394-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>ioctl communication between kernel and user space</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;use block device as example:&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;user space program:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;struct Test_info  test_info;&lt;/div&gt;&lt;div&gt;ioctl ( fd,  ADD,  &amp;amp;test_info);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;driver:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;1. define a function to deal with ioctl operation &amp;amp; assign this function &lt;/div&gt;&lt;div&gt;    to struct block_device_operations&lt;/div&gt;&lt;div&gt;     ex: &lt;/div&gt;&lt;div&gt;     &lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;define a function  test_ioctl&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;     struct block_device_operations test_ops;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;     test_ops.ioctl = test_ioctl       &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;2.  define the function to deal with ioctl operation&lt;/div&gt;&lt;div&gt;     it will receive two important parameters.&lt;/div&gt;&lt;div&gt;     One is command, the other is argument.&lt;/div&gt;&lt;div&gt;     From out example,  the command received is ADD, the parameter received is &amp;amp;test_info&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3.  copy data from user space to kernel space&lt;/div&gt;&lt;div&gt;     use copy_from_user&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5023099605827657213?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5023099605827657213/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5023099605827657213' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5023099605827657213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5023099605827657213'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/ioctl-communication-between-kernel-and.html' title='ioctl communication between kernel and user space'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6571648778356540805</id><published>2008-05-06T02:04:00.000-07:00</published><updated>2008-05-06T02:16:16.709-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>copy_from_user</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;copy_from_user(void *to, const void *from, long n);&lt;/span&gt;&lt;div&gt;to: point to kernel-space address&lt;/div&gt;&lt;div&gt;from :  point to user-space address&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6571648778356540805?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6571648778356540805/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6571648778356540805' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6571648778356540805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6571648778356540805'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/copyfromuser.html' title='copy_from_user'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-1580510029662222475</id><published>2008-05-05T00:44:00.000-07:00</published><updated>2008-05-06T02:04:13.980-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux programming'/><title type='text'>function stat</title><content type='html'>&lt;span class="Apple-style-span"  style="  ;font-family:'Lucida Grande';"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;int  &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;stat(&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;char&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*restrict&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;path&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;struct&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;stat&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;*restrict&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;buf&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="  font-weight: bold;font-family:'Lucida Grande';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="  font-weight: bold;font-family:'Lucida Grande';"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;get file status&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style=" ;font-family:'Lucida Grande';"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style=" ;font-family:'Lucida Grande';font-size:48px;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;struct stat {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;dev_t st_dev;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;ino_t st_ino;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;mode_t st_mode;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;nlink_t st_nlink;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;uid_t st_uid;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;gid_t st_gid;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;dev_t st_rdev;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;off_t st_size;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;time_t st_atime;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;time_t st_mtime;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;time_t st_ctime;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;blksize_t st_blksize;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;blkcnt_t st_blocks;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;mode_t st_attr;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}; &lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-1580510029662222475?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/1580510029662222475/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=1580510029662222475' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1580510029662222475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/1580510029662222475'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/function-stat.html' title='function stat'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-3092286036019989030</id><published>2008-05-04T23:53:00.000-07:00</published><updated>2008-05-05T00:55:17.511-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux driver'/><title type='text'>structure  sg_io_hdr_t</title><content type='html'>&lt;span class="Apple-style-span"   style="border-collapse: collapse;   font-family:Arial;font-size:14px;"&gt;&lt;pre class="PROGRAMLISTING"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-3092286036019989030?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/3092286036019989030/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=3092286036019989030' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3092286036019989030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/3092286036019989030'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/structure-sgiohdrt.html' title='structure  sg_io_hdr_t'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-5476642521772837489</id><published>2008-05-04T20:06:00.000-07:00</published><updated>2008-05-04T20:08:01.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>getopt</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;getopt(&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;int&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;argc&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;, &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;char&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;*&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;const&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;argv[]&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;, &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;const&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;char&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;*optstring&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;)&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px; "&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal; "&gt;get option character from command line argument list&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px;"&gt;ex:getopt(argc, argv, “bf:")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px;"&gt;     options are b &amp;amp; f&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-5476642521772837489?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/5476642521772837489/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=5476642521772837489' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5476642521772837489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/5476642521772837489'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/getopt.html' title='getopt'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-736104901529208261</id><published>2008-05-04T20:00:00.001-07:00</published><updated>2008-05-04T20:00:57.686-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>strdup</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px; "&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;char&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;*  &lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;strdup(&lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;const&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;char&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;*s1&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;); &lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px; "&gt;allocates sufficient memory for a copy of the string s1, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 14px; "&gt;does the copy, and returns a pointer to it.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-736104901529208261?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/736104901529208261/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=736104901529208261' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/736104901529208261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/736104901529208261'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/strdup.html' title='strdup'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6145634461153730733</id><published>2008-05-04T19:50:00.000-07:00</published><updated>2008-05-04T19:51:24.855-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c'/><title type='text'>strstr</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;strstr(const char *s1, const char *s2);&lt;/span&gt;&lt;div&gt;locate a substring in a string&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6145634461153730733?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6145634461153730733/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6145634461153730733' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6145634461153730733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6145634461153730733'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/strstr.html' title='strstr'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-6182911444612237941</id><published>2008-05-04T19:13:00.000-07:00</published><updated>2008-05-04T19:35:47.455-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux programming'/><title type='text'>struct utsname  &amp; uname</title><content type='html'>&lt;span class="Apple-style-span"  style=" ;font-family:Times;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;struct utsname&lt;/span&gt;&lt;/div&gt;hold information returned by the &lt;code&gt;uname&lt;/code&gt; function&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-family: Courier; font-size: 15px; "&gt;&lt;tt&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;uname(struct utsname *&lt;/span&gt;&lt;/tt&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;name&lt;/span&gt;&lt;/i&gt;&lt;tt&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;)&lt;/span&gt;&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Courier; font-size: 15px; font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; font-weight: normal; "&gt;store information identifying the current system in the structure pointed to by &lt;i&gt;name&lt;/i&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-6182911444612237941?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/6182911444612237941/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=6182911444612237941' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6182911444612237941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/6182911444612237941'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/05/struct-utsname.html' title='struct utsname  &amp; uname'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3023753433804259679.post-4505244538183842105</id><published>2008-04-30T01:38:00.000-07:00</published><updated>2008-04-30T01:39:46.535-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux software'/><title type='text'>vnc</title><content type='html'>start:&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 153);"&gt;vncserver&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3023753433804259679-4505244538183842105?l=deeplylovelinux.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://deeplylovelinux.blogspot.com/feeds/4505244538183842105/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3023753433804259679&amp;postID=4505244538183842105' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4505244538183842105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3023753433804259679/posts/default/4505244538183842105'/><link rel='alternate' type='text/html' href='http://deeplylovelinux.blogspot.com/2008/04/vnc.html' title='vnc'/><author><name>deeplove</name><uri>http://www.blogger.com/profile/10859592301681118171</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
