(file) Return to emlog.c CVS log (file) Jump to this file's LXR Page (dir) Up to [CENS] / misc / emlog

Diff for /misc/emlog/emlog.c between version 1.7 and 1.8

version 1.7, 2001/08/13 21:29:20 version 1.8, 2001/08/30 06:11:05
Line 159 
Line 159 
 static int emlog_open(struct inode *inode, struct file *file) static int emlog_open(struct inode *inode, struct file *file)
 { {
   int minor = MINOR(inode->i_rdev);   int minor = MINOR(inode->i_rdev);
   
   struct emlog_info *einfo = NULL;   struct emlog_info *einfo = NULL;
   int retval;    int retval = 0;
   
     MOD_INC_USE_COUNT;
  
   if ((einfo = get_einfo(inode)) == NULL) {   if ((einfo = get_einfo(inode)) == NULL) {
     /* never heard of this inode before... create a new record */     /* never heard of this inode before... create a new record */
     if ((retval = create_einfo(inode, minor, &einfo)) < 0)     if ((retval = create_einfo(inode, minor, &einfo)) < 0)
       return retval;        goto out;
   }   }
  
   if (einfo == NULL) {   if (einfo == NULL) {
     printk("BUG IN EMLOG!\n");     printk("BUG IN EMLOG!\n");
     return -EIO;      retval = -EIO;
       goto out;
   }   }
  
     /* success! */
   einfo->refcount++;   einfo->refcount++;
   MOD_INC_USE_COUNT;  
   return 0;   out:
     if (retval < 0)
       MOD_DEC_USE_COUNT;
     return retval;
 } }
  
  


Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CENS CVS Mailing List
Powered by
ViewCVS 0.9.2