diff for duplicates of <4933F712.2000506@cam.ac.uk> diff --git a/a/1.txt b/N1/1.txt index 13bed5e..f04a89f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -72,7 +72,7 @@ index 0000000..e963d61 + pos = sprintf(temp, "%s", iio_dir); + pos += sprintf(temp + pos, "/"); + dp = opendir(iio_dir); -+ if (dp == NULL) { ++ if (dp = NULL) { + printf("No industrialio devices available"); + return NULL; + } @@ -99,7 +99,7 @@ index 0000000..e963d61 + } + } + fscanf(nameFile, "%s", thisname); -+ if (strcmp(name, thisname) == 0) { ++ if (strcmp(name, thisname) = 0) { + returnstring = malloc(strlen(temp) + 1); + sprintf(temp + pos2, ""); + strcpy(returnstring, temp); @@ -141,13 +141,13 @@ index 0000000..e963d61 + + /* Parameters to disable particular channels */ + for (i = 1; i < argc; i++) { -+ if (strcmp(argv[i], "-x") == 0) ++ if (strcmp(argv[i], "-x") = 0) + scanx = 0; -+ if (strcmp(argv[i], "-y") == 0) ++ if (strcmp(argv[i], "-y") = 0) + scany = 0; -+ if (strcmp(argv[i], "-z") == 0) ++ if (strcmp(argv[i], "-z") = 0) + scanz = 0; -+ if (strcmp(argv[i], "-ts") == 0) ++ if (strcmp(argv[i], "-ts") = 0) + scants = 0; + } + /* Getting the s64 aligned correctly - this will end up in @@ -168,7 +168,7 @@ index 0000000..e963d61 + data = malloc(datum_size*RingLength); + BaseDirectoryName = find_device_by_name(device_name); + -+ if (BaseDirectoryName == NULL) { ++ if (BaseDirectoryName = NULL) { + printf("Failed to find the %s \n", device_name); + return -1; + } @@ -179,7 +179,7 @@ index 0000000..e963d61 + /* Set a sensible ring buffer length */ + sprintf(temp, "%sring_buffer/length", BaseDirectoryName); + sysfsfp = fopen(temp, "w"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open the rb length file at %s\n", temp); + return -1; + } @@ -188,7 +188,7 @@ index 0000000..e963d61 + /* Create relevant device Nodes */ + sprintf(temp, "%sring_buf0_acc_minor", BaseDirectoryName); + sysfsfp = fopen(temp, "r"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open minor stuff %s \n", temp); + return -1; + } @@ -199,7 +199,7 @@ index 0000000..e963d61 + fclose(sysfsfp); + sprintf(temp, "%sring_buf0_ev_minor", BaseDirectoryName); + sysfsfp = fopen(temp, "r"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open minor stuff \n"); + return -1; + } @@ -212,7 +212,7 @@ index 0000000..e963d61 + sprintf(temp, "%s/scan_elements/scan_en_accel_x", + BaseDirectoryName); + sysfsfp = fopen(temp, "w"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open scan_en_accel_x\n"); + return -1; + } @@ -226,7 +226,7 @@ index 0000000..e963d61 + sprintf(temp, "%s/scan_elements/scan_en_accel_y", + BaseDirectoryName); + sysfsfp = fopen(temp, "w"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open scan_en_accel_y\n"); + return -1; + } @@ -240,7 +240,7 @@ index 0000000..e963d61 + sprintf(temp, "%s/scan_elements/scan_en_accel_z", + BaseDirectoryName); + sysfsfp = fopen(temp, "w"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open scan_en_accel_z\n"); + return -1; + } @@ -254,7 +254,7 @@ index 0000000..e963d61 + sprintf(temp, "%s/scan_elements/scan_en_timestamp", + BaseDirectoryName); + sysfsfp = fopen(temp, "w"); -+ if (sysfsfp == NULL) { ++ if (sysfsfp = NULL) { + printf("failed to open scan_en_timestamp\n"); + return -1; + } @@ -268,7 +268,7 @@ index 0000000..e963d61 + sprintf(temp, "%sring_buffer/ring_enable", BaseDirectoryName); + ringcont = fopen(temp, "w"); + -+ if (ringcont == NULL) { ++ if (ringcont = NULL) { + printf("Failed to open the rb control file \n"); + return -1; + }; @@ -277,20 +277,20 @@ index 0000000..e963d61 + } + /* Attempt to open non blocking the access dev */ + fp = open(name_chrdevring, O_RDONLY | O_NONBLOCK); -+ if (fp == -1) { /*If it isn't there make the node */ ++ if (fp = -1) { /*If it isn't there make the node */ + sprintf(command, "mknod %s c 244 %d; mknod %s c 244 %d; ", + name_chrdevring, minor, name_chrdevevt, minor_ev); + system(command); + sleep(5); + fp = open(name_chrdevring, O_RDONLY | O_NONBLOCK); -+ if (fp == -1) { ++ if (fp = -1) { + printf("Unable to open %s\n", name_chrdevring); + return -1; + } + } + /* Attempt to open the event access dev (blocking this time) */ + fp_ev = fopen(name_chrdevevt, "rb"); -+ if (fp_ev == NULL) { ++ if (fp_ev = NULL) { + + printf("bug opening %s\n", name_chrdevevt); + return -1; @@ -314,7 +314,7 @@ index 0000000..e963d61 + printf("Unexpecteded event code\n"); + } + read_size = read(fp, (char *)(data), toread*(datum_size)); -+ if (read_size == -EAGAIN) ++ if (read_size = -EAGAIN) + printf("nothing available \n"); + /* Print out the first 10% of the values recieved from the rb*/ + for (i = 0; i < (read_size / datum_size)*0.1; i++) { @@ -348,7 +348,7 @@ index 0000000..e963d61 + + sprintf(temp, "%sring_buffer/ring_enable", BaseDirectoryName); + ringcont = fopen(temp, "w"); -+ if (ringcont == NULL) { ++ if (ringcont = NULL) { + printf("Failed to open the rb control file \n"); + return -1; + }; @@ -362,3 +362,8 @@ index 0000000..e963d61 + + return 0; +} + +_______________________________________________ +lm-sensors mailing list +lm-sensors@lm-sensors.org +http://lists.lm-sensors.org/mailman/listinfo/lm-sensors diff --git a/a/content_digest b/N1/content_digest index be9d6a4..ffb5908 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "ref\04933F291.4020001@cam.ac.uk\0" "From\0Jonathan Cameron <jic23@cam.ac.uk>\0" - "Subject\0[Industrial I/O] [13/13] RFC: Example user space application\0" + "Subject\0[lm-sensors] [Industrial I/O] [13/13] RFC: Example user space\0" "Date\0Mon, 01 Dec 2008 14:39:14 +0000\0" "To\0Jonathan Cameron <jic23@cam.ac.uk>\0" "Cc\0LKML <linux-kernel@vger.kernel.org>" @@ -86,7 +86,7 @@ "+\tpos = sprintf(temp, \"%s\", iio_dir);\n" "+\tpos += sprintf(temp + pos, \"/\");\n" "+\tdp = opendir(iio_dir);\n" - "+\tif (dp == NULL) {\n" + "+\tif (dp = NULL) {\n" "+\t\tprintf(\"No industrialio devices available\");\n" "+\t\treturn NULL;\n" "+\t}\n" @@ -113,7 +113,7 @@ "+\t\t\t\t\t}\n" "+\t\t\t\t}\n" "+\t\t\t\tfscanf(nameFile, \"%s\", thisname);\n" - "+\t\t\t\tif (strcmp(name, thisname) == 0) {\n" + "+\t\t\t\tif (strcmp(name, thisname) = 0) {\n" "+\t\t\t\t\treturnstring = malloc(strlen(temp) + 1);\n" "+\t\t\t\t\tsprintf(temp + pos2, \"\");\n" "+\t\t\t\t\tstrcpy(returnstring, temp);\n" @@ -155,13 +155,13 @@ "+\n" "+\t/* Parameters to disable particular channels */\n" "+\tfor (i = 1; i < argc; i++) {\n" - "+\t\tif (strcmp(argv[i], \"-x\") == 0)\n" + "+\t\tif (strcmp(argv[i], \"-x\") = 0)\n" "+\t\t\tscanx = 0;\n" - "+\t\tif (strcmp(argv[i], \"-y\") == 0)\n" + "+\t\tif (strcmp(argv[i], \"-y\") = 0)\n" "+\t\t\tscany = 0;\n" - "+\t\tif (strcmp(argv[i], \"-z\") == 0)\n" + "+\t\tif (strcmp(argv[i], \"-z\") = 0)\n" "+\t\t\tscanz = 0;\n" - "+\t\tif (strcmp(argv[i], \"-ts\") == 0)\n" + "+\t\tif (strcmp(argv[i], \"-ts\") = 0)\n" "+\t\t\tscants = 0;\n" "+\t}\n" "+\t/* Getting the s64 aligned correctly - this will end up in\n" @@ -182,7 +182,7 @@ "+\tdata = malloc(datum_size*RingLength);\n" "+\tBaseDirectoryName = find_device_by_name(device_name);\n" "+\n" - "+\tif (BaseDirectoryName == NULL) {\n" + "+\tif (BaseDirectoryName = NULL) {\n" "+\t\tprintf(\"Failed to find the %s \\n\", device_name);\n" "+\t\treturn -1;\n" "+\t}\n" @@ -193,7 +193,7 @@ "+\t/* Set a sensible ring buffer length */\n" "+\tsprintf(temp, \"%sring_buffer/length\", BaseDirectoryName);\n" "+\tsysfsfp = fopen(temp, \"w\");\n" - "+\tif (sysfsfp == NULL) {\n" + "+\tif (sysfsfp = NULL) {\n" "+\t\tprintf(\"failed to open the rb length file at %s\\n\", temp);\n" "+\t\treturn -1;\n" "+\t}\n" @@ -202,7 +202,7 @@ "+\t/* Create relevant device Nodes */\n" "+\tsprintf(temp, \"%sring_buf0_acc_minor\", BaseDirectoryName);\n" "+\tsysfsfp = fopen(temp, \"r\");\n" - "+\tif (sysfsfp == NULL) {\n" + "+\tif (sysfsfp = NULL) {\n" "+\t\tprintf(\"failed to open minor stuff %s \\n\", temp);\n" "+\t\treturn -1;\n" "+\t}\n" @@ -213,7 +213,7 @@ "+\tfclose(sysfsfp);\n" "+\tsprintf(temp, \"%sring_buf0_ev_minor\", BaseDirectoryName);\n" "+\tsysfsfp = fopen(temp, \"r\");\n" - "+\tif (sysfsfp == NULL) {\n" + "+\tif (sysfsfp = NULL) {\n" "+\t\tprintf(\"failed to open minor stuff \\n\");\n" "+\t\treturn -1;\n" "+\t}\n" @@ -226,7 +226,7 @@ "+\t\tsprintf(temp, \"%s/scan_elements/scan_en_accel_x\",\n" "+\t\t\tBaseDirectoryName);\n" "+\t\tsysfsfp = fopen(temp, \"w\");\n" - "+\t\tif (sysfsfp == NULL) {\n" + "+\t\tif (sysfsfp = NULL) {\n" "+\t\t\tprintf(\"failed to open scan_en_accel_x\\n\");\n" "+\t\t\treturn -1;\n" "+\t\t}\n" @@ -240,7 +240,7 @@ "+\t\tsprintf(temp, \"%s/scan_elements/scan_en_accel_y\",\n" "+\t\t\tBaseDirectoryName);\n" "+\t\tsysfsfp = fopen(temp, \"w\");\n" - "+\t\tif (sysfsfp == NULL) {\n" + "+\t\tif (sysfsfp = NULL) {\n" "+\t\t\tprintf(\"failed to open scan_en_accel_y\\n\");\n" "+\t\t\treturn -1;\n" "+\t\t}\n" @@ -254,7 +254,7 @@ "+\t\tsprintf(temp, \"%s/scan_elements/scan_en_accel_z\",\n" "+\t\t\tBaseDirectoryName);\n" "+\t\tsysfsfp = fopen(temp, \"w\");\n" - "+\t\tif (sysfsfp == NULL) {\n" + "+\t\tif (sysfsfp = NULL) {\n" "+\t\t\tprintf(\"failed to open scan_en_accel_z\\n\");\n" "+\t\t\treturn -1;\n" "+\t\t}\n" @@ -268,7 +268,7 @@ "+\t\tsprintf(temp, \"%s/scan_elements/scan_en_timestamp\",\n" "+\t\t\tBaseDirectoryName);\n" "+\t\tsysfsfp = fopen(temp, \"w\");\n" - "+\t\tif (sysfsfp == NULL) {\n" + "+\t\tif (sysfsfp = NULL) {\n" "+\t\t\tprintf(\"failed to open scan_en_timestamp\\n\");\n" "+\t\t\treturn -1;\n" "+\t\t}\n" @@ -282,7 +282,7 @@ "+\t\tsprintf(temp, \"%sring_buffer/ring_enable\", BaseDirectoryName);\n" "+\t\tringcont = fopen(temp, \"w\");\n" "+\n" - "+\t\tif (ringcont == NULL) {\n" + "+\t\tif (ringcont = NULL) {\n" "+\t\t\tprintf(\"Failed to open the rb control file \\n\");\n" "+\t\t\treturn -1;\n" "+\t\t};\n" @@ -291,20 +291,20 @@ "+\t}\n" "+\t/* Attempt to open non blocking the access dev */\n" "+\tfp = open(name_chrdevring, O_RDONLY | O_NONBLOCK);\n" - "+\tif (fp == -1) { /*If it isn't there make the node */\n" + "+\tif (fp = -1) { /*If it isn't there make the node */\n" "+\t\tsprintf(command, \"mknod %s c 244 %d; mknod %s c 244 %d; \",\n" "+\t\t\tname_chrdevring, minor, name_chrdevevt, minor_ev);\n" "+\t\tsystem(command);\n" "+\t\tsleep(5);\n" "+\t\tfp = open(name_chrdevring, O_RDONLY | O_NONBLOCK);\n" - "+\t\tif (fp == -1) {\n" + "+\t\tif (fp = -1) {\n" "+\t\t\tprintf(\"Unable to open %s\\n\", name_chrdevring);\n" "+\t\t\treturn -1;\n" "+\t\t}\n" "+\t}\n" "+\t/* Attempt to open the event access dev (blocking this time) */\n" "+\tfp_ev = fopen(name_chrdevevt, \"rb\");\n" - "+\tif (fp_ev == NULL) {\n" + "+\tif (fp_ev = NULL) {\n" "+\n" "+\t\tprintf(\"bug opening %s\\n\", name_chrdevevt);\n" "+\t\treturn -1;\n" @@ -328,7 +328,7 @@ "+\t\t\tprintf(\"Unexpecteded event code\\n\");\n" "+\t\t}\n" "+\t\tread_size = read(fp, (char *)(data), toread*(datum_size));\n" - "+\t\tif (read_size == -EAGAIN)\n" + "+\t\tif (read_size = -EAGAIN)\n" "+\t\t\tprintf(\"nothing available \\n\");\n" "+\t\t/* Print out the first 10% of the values recieved from the rb*/\n" "+\t\tfor (i = 0; i < (read_size / datum_size)*0.1; i++) {\n" @@ -362,7 +362,7 @@ "+\n" "+\t\tsprintf(temp, \"%sring_buffer/ring_enable\", BaseDirectoryName);\n" "+\t\tringcont = fopen(temp, \"w\");\n" - "+\t\tif (ringcont == NULL) {\n" + "+\t\tif (ringcont = NULL) {\n" "+\t\t\tprintf(\"Failed to open the rb control file \\n\");\n" "+\t\t\treturn -1;\n" "+\t\t};\n" @@ -375,6 +375,11 @@ "+\tfree(data);\n" "+\n" "+\treturn 0;\n" - +} + "+}\n" + "\n" + "_______________________________________________\n" + "lm-sensors mailing list\n" + "lm-sensors@lm-sensors.org\n" + http://lists.lm-sensors.org/mailman/listinfo/lm-sensors -6d6de516268759c1a866196665182a9e79dcd3961ab44da5cedc4a544a197a28 +0093e50717e09596dd6b41e2dc456121975ffadb8a62d7f24116b0fd80b72136
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.