Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 577328 Details for
Bug 812342
[FEAT] inotify support
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A C program that can test that the GlusterFS does not support inotify
inotify_listen.c (text/x-csrc), 1.59 KB, created by
Joaquin Diaz Trepat
on 2012-04-13 12:59:59 UTC
(
hide
)
Description:
A C program that can test that the GlusterFS does not support inotify
Filename:
MIME Type:
Creator:
Joaquin Diaz Trepat
Created:
2012-04-13 12:59:59 UTC
Size:
1.59 KB
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <errno.h> >#include <sys/types.h> >#include <sys/inotify.h> > >#define EVENT_SIZE ( sizeof (struct inotify_event) ) >#define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) > >int main( int argc, char **argv ) >{ > int length, i = 0; > int fd; > int wd; > char buffer[BUF_LEN]; > > fd = inotify_init(); > > if ( fd < 0 ) { > perror( "inotify_init" ); > } > > wd = inotify_add_watch( fd, "/home/jd", > IN_MODIFY | IN_CREATE | IN_DELETE ); > length = read( fd, buffer, BUF_LEN ); > > if ( length < 0 ) { > perror( "read" ); > } > > while ( i < length ) { > struct inotify_event *event = ( struct inotify_event * ) &buffer[ i ]; > if ( event->len ) { > if ( event->mask & IN_CREATE ) { > if ( event->mask & IN_ISDIR ) { > printf( "The directory %s was created.\n", event->name ); > } > else { > printf( "The file %s was created.\n", event->name ); > } > } > else if ( event->mask & IN_DELETE ) { > if ( event->mask & IN_ISDIR ) { > printf( "The directory %s was deleted.\n", event->name ); > } > else { > printf( "The file %s was deleted.\n", event->name ); > } > } > else if ( event->mask & IN_MODIFY ) { > if ( event->mask & IN_ISDIR ) { > printf( "The directory %s was modified.\n", event->name ); > } > else { > printf( "The file %s was modified.\n", event->name ); > } > } > } > i += EVENT_SIZE + event->len; > } > > ( void ) inotify_rm_watch( fd, wd ); > ( void ) close( fd ); > > exit( 0 ); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 812342
: 577328