static int device_release(struct inode *inode, struct file *file)
{
gl_nDeviceOpened--;
+ EPRINTF("++ pre module_put");
module_put(THIS_MODULE);
+ EPRINTF("++ aft module_put");
return 0;
}
}
DPRINTF("Bundle has been copied successfully");
- last_error_buffer_initialize();
+// last_error_buffer_initialize();
- if (link_bundle() == -1) {
+// printk(" --++@@ bef lb\n");
+ if (link_bundle() == -1 || has_last_error() == -1) {
EPRINTF("Cannot link profile bundle!");
result = -1;
break;
}
- if (has_last_error() == -1) {
- EPRINTF("last_error_buffer != NULL");
- result = -1;
- }
+// printk(" --++@@ bef has_last_error\n");
+// if (has_last_error() == -1) {
+// printk(" --++@@ in if\n");
+// DPRINTF("last_error_buffer != NULL");
+// result = -1;
+// }
+// printk(" --++@@ aft has_last_error\n");
break;
}
case EC_IOCTL_GET_LAST_ERROR:
{
result = get_last_error((void*)arg);
+ DPRINTF("Get last error buffer");
break;
}
default:
#include "probes_manager.h"
#include "probes.h"
#include "event_tmpl.h"
+#include "error_storage.h"
-extern int update_errno_buffer(const char *buffer);
-extern int get_last_error(void* u_addr);
-extern int has_last_error(void);
-extern void last_error_buffer_initialize(void);
+//extern int update_errno_buffer(const char *buffer);
+//extern int get_last_error(void* u_addr);
+//extern int has_last_error(void);
+//extern void last_error_buffer_initialize(void);
///////////////////////////////////////////////////////////////////////////////////////////////////
extern int EnableContinuousRetrieval(void);