[PATCH][ppc64-diag] Fix for typos

Frédéric Bonnard <[email protected]> Fri, 10 Jun 2016 17:19:41 +0200
Newsgroups gmane.linux.tools.diag.devel
Message-ID <[email protected]>
From: Frederic Bonnard <[email protected]>

While reviewing the Debian packaging, codespell found those.
Proposed fixes are based on codespell's default dictionnary.

Signed-off-by: Frederic Bonnard <[email protected]>
---
 common/utils.c                              |  2 +-
 ela/message_catalog/e1000e                  |  4 ++--
 ela/message_catalog/with_regex/e1000e       |  4 ++--
 lpd/files.c                                 |  2 +-
 lpd/indicator.c                             |  4 ++--
 lpd/indicator_rtas.c                        |  4 ++--
 lpd/lp_diag.c                               |  2 +-
 lpd/test/lpd_ela_test.sh                    |  4 ++--
 opal_errd/opal-elog-parse/opal-ei-scn.c     |  2 +-
 opal_errd/opal-elog-parse/opal-event-data.c |  2 +-
 opal_errd/opal_errd.c                       |  2 +-
 opal_errd/run_tests                         |  2 +-
 ppc64-diag.spec                             |  2 +-
 rtas_errd/config.c                          |  2 +-
 rtas_errd/ela.c                             | 10 +++++-----
 rtas_errd/ela_msg.h                         |  4 ++--
 rtas_errd/epow.c                            |  2 +-
 rtas_errd/extract_platdump.c                |  6 +++---
 rtas_errd/files.c                           |  8 ++++----
 rtas_errd/update.c                          |  6 +++---
 rules.mk                                    |  2 +-
 21 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/common/utils.c b/common/utils.c
index 044a8f0..bedbd27 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -109,7 +109,7 @@ FILE *spopen(char *argv[], pid_t *ppid)
 		return NULL;
 	case  0: /* Code executed by child */
 		if (process_child(argv, pipefd) == -1) {
-			fprintf(stderr, "%s : %d - Error occured while "
+			fprintf(stderr, "%s : %d - Error occurred while "
 					"processing write end of the pipe "
 					"(in child).", __func__, __LINE__);
 			exit(EXIT_FAILURE);
diff --git a/ela/message_catalog/e1000e b/ela/message_catalog/e1000e
index 4922f1e..5cb44b9 100644
--- a/ela/message_catalog/e1000e
+++ b/ela/message_catalog/e1000e
@@ -100,7 +100,7 @@ forced.
 }}
 action {{
 1. Enable autoneg to allow MDI setting.
-2. Dont force speed and/or duplex.
+2. Don't force speed and/or duplex.
 }}
 class: hardware  type: temp  refcode: "MDIreqAutoneg"
 
@@ -248,7 +248,7 @@ class: software  sl_severity: warning  refcode: "ErrCfgFC"
  * dup: e_dbg "RXing /C/, enable AutoNeg and stop forcing link.\n"
  * e_dbg "SERDES: Link up - forced.\n"
  * e_dbg "SERDES: Link down - force failed.\n"
- * e_dbg "SERDES: Link up - autoneg completed sucessfully.\n"
+ * e_dbg "SERDES: Link up - autoneg completed successfully.\n"
  * e_dbg "SERDES: Link down - invalidcodewords detected in autoneg.\n"
  * e_dbg "SERDES: Link down - no sync.\n"
  * e_dbg "SERDES: Link down - autoneg failed\n"
diff --git a/ela/message_catalog/with_regex/e1000e b/ela/message_catalog/with_regex/e1000e
index 1b8b988..9d216ae 100644
--- a/ela/message_catalog/with_regex/e1000e
+++ b/ela/message_catalog/with_regex/e1000e
@@ -103,7 +103,7 @@ forced.
 }}
 action {{
 1. Enable autoneg to allow MDI setting.
-2. Dont force speed and/or duplex.
+2. Don't force speed and/or duplex.
 }}
 class: hardware  type: temp  refcode: "MDIreqAutoneg"
 
@@ -264,7 +264,7 @@ class: software  sl_severity: warning  refcode: "ErrCfgFC"
  * dup: e_dbg "RXing /C/, enable AutoNeg and stop forcing link.\n"
  * e_dbg "SERDES: Link up - forced.\n"
  * e_dbg "SERDES: Link down - force failed.\n"
- * e_dbg "SERDES: Link up - autoneg completed sucessfully.\n"
+ * e_dbg "SERDES: Link up - autoneg completed successfully.\n"
  * e_dbg "SERDES: Link down - invalidcodewords detected in autoneg.\n"
  * e_dbg "SERDES: Link down - no sync.\n"
  * e_dbg "SERDES: Link down - autoneg failed\n"
diff --git a/lpd/files.c b/lpd/files.c
index 7c3c019..39c3a4e 100644
--- a/lpd/files.c
+++ b/lpd/files.c
@@ -337,7 +337,7 @@ rotate_log_file(char *lp_log_file)
  * init_files - Open log files
  *
  * Returns :
- *	0 on sucess, !0 on failure
+ *	0 on success, !0 on failure
  */
 int
 init_files(void)
diff --git a/lpd/indicator.c b/lpd/indicator.c
index 59f6e64..7ee00d1 100644
--- a/lpd/indicator.c
+++ b/lpd/indicator.c
@@ -312,7 +312,7 @@ set_all_indicator_state(int indicator, struct loc_code *loc, int new_value)
  * enable_check_log_indicator - Enable check log indicator
  *
  * Returns :
- *	0 on sucess, !0 on failure
+ *	0 on success, !0 on failure
  */
 int
 enable_check_log_indicator(void)
@@ -340,7 +340,7 @@ enable_check_log_indicator(void)
  * disable_check_log_indicator - Disable check log indicator
  *
  * Returns :
- *	0 on sucess, !0 on failure
+ *	0 on success, !0 on failure
  */
 int
 disable_check_log_indicator(void)
diff --git a/lpd/indicator_rtas.c b/lpd/indicator_rtas.c
index 4d9a04b..5bc3d8c 100644
--- a/lpd/indicator_rtas.c
+++ b/lpd/indicator_rtas.c
@@ -131,7 +131,7 @@ parse_rtas_workarea(struct loc_code *loc, const char *buf)
  *	@author Nathan Fontenot <[email protected]>
  *
  * This will check the error value for a librtas specific return code
- * and fill in the buffer with the appropraite error message.
+ * and fill in the buffer with the appropriate error message.
  *
  * @error	return code from librtas
  * @buf		buffer to fill with error string
@@ -160,7 +160,7 @@ librtas_error(int error, char *buf, size_t size)
 		snprintf(buf, size, "Kernel out of low memory");
 		break;
 	case RTAS_FREE_ERR:
-		snprintf(buf, size, "Attempt to free nonexistant RMO buffer");
+		snprintf(buf, size, "Attempt to free nonexistent RMO buffer");
 		break;
 	case RTAS_TIMEOUT:
 		snprintf(buf, size, "RTAS delay exceeded specified timeout");
diff --git a/lpd/lp_diag.c b/lpd/lp_diag.c
index 232c431..cce8e87 100644
--- a/lpd/lp_diag.c
+++ b/lpd/lp_diag.c
@@ -487,7 +487,7 @@ event_out:
  * @repair_id	servicelog repair ID
  *
  * Returns :
- *	0 on sucess, !0 on failure
+ *	0 on success, !0 on failure
  */
 static int
 parse_repair_event(int repair_id)
diff --git a/lpd/test/lpd_ela_test.sh b/lpd/test/lpd_ela_test.sh
index 0e0ebea..c92728f 100755
--- a/lpd/test/lpd_ela_test.sh
+++ b/lpd/test/lpd_ela_test.sh
@@ -127,7 +127,7 @@ return 0
 
 ################################################################################
 # print_log_footer ()
-# Purpose	: Checks whether the testcase ended successfuly and prints
+# Purpose	: Checks whether the testcase ended successfully and prints
 #		  its status
 # Parameters	: None
 # Returns	: 0
@@ -264,7 +264,7 @@ exec_log "explain_syslog -m $MESSAGE_FILE"
 
 MESSAGE=$(explain_syslog -m $MESSAGE_FILE | grep "unrecognized message" )
 if [ "$MESSAGE" = "" ]; then
-    print_log "explain_syslog successfull"
+    print_log "explain_syslog successful"
 else
     print_log "ERROR: explain_syslog does not explain the message" | tee -a $ERROR_LOG
     IS_FAILED=1
diff --git a/opal_errd/opal-elog-parse/opal-ei-scn.c b/opal_errd/opal-elog-parse/opal-ei-scn.c
index f220671..1e80212 100644
--- a/opal_errd/opal-elog-parse/opal-ei-scn.c
+++ b/opal_errd/opal-elog-parse/opal-ei-scn.c
@@ -66,7 +66,7 @@ int print_ei_scn(const struct opal_ei_scn *ei)
 	print_header("Environmental Information");
 	print_opal_v6_hdr(ei->v6hdr);
 	print_center("Genesis Readings");
-	print_line("Timetamp", "0x%016lx", ei->g_timestamp);
+	print_line("Timestamp", "0x%016lx", ei->g_timestamp);
 	print_ei_env_scn(&(ei->genesis));
 
 	print_center(" ");
diff --git a/opal_errd/opal-elog-parse/opal-event-data.c b/opal_errd/opal-elog-parse/opal-event-data.c
index 8d4aedb..35790f3 100644
--- a/opal_errd/opal-elog-parse/opal-event-data.c
+++ b/opal_errd/opal-elog-parse/opal-event-data.c
@@ -141,7 +141,7 @@ struct generic_desc{
    {0x78, "CMM B"}, \
    {0x7a, "Connection Monitoring - Hypervisor lost communication with service processor"}, \
    {0x7b, "Connection Monitoring - Service processor lost communication with hypervisor"}, \
-   {0x7c, "Connection Monitoring - Service processor lost communcation with hypervisor"}, \
+   {0x7c, "Connection Monitoring - Service processor lost communication with hypervisor"}, \
    {0x7e, "Connection Monitoring - Hypervisor lost communication with logical partition"}, \
    {0x7e, "Connection Monitoring - Hypervisor lost communication with BPA"}, \
    {0x7f, "Connection Monitoring - Hypervisor lost communication with another hypervisor"}, \
diff --git a/opal_errd/opal_errd.c b/opal_errd/opal_errd.c
index aaf1fe8..07cbf31 100644
--- a/opal_errd/opal_errd.c
+++ b/opal_errd/opal_errd.c
@@ -68,7 +68,7 @@
 /**
  * ELOG retention policy
  *
- * Retain logs upto 30 days with max 1000 logs.
+ * Retain logs up to 30 days with max 1000 logs.
  */
 #define DEFAULT_MAX_ELOGS		1000
 #define DEFAULT_MAX_DAYS		30
diff --git a/opal_errd/run_tests b/opal_errd/run_tests
index 656c604..72bc636 100755
--- a/opal_errd/run_tests
+++ b/opal_errd/run_tests
@@ -33,7 +33,7 @@ function run_binary {
 }
 
 function diff_with_result {
-	# Explicitly diff a file with an arbitary result file
+	# Explicitly diff a file with an arbitrary result file
 	if [[ $# -eq 1 ]] ; then
 		if ! diff -u $RESULT $1 ; then
 			register_fail;
diff --git a/ppc64-diag.spec b/ppc64-diag.spec
index 3d05716..2854ba3 100644
--- a/ppc64-diag.spec
+++ b/ppc64-diag.spec
@@ -101,7 +101,7 @@ fi
 
 %changelog
 * Mon May 9 2016 - Vasant Hegde <[email protected]> - 2.7.1
-- Fixed endianess issues in diagnostics code
+- Fixed endianness issues in diagnostics code
 
 * Tue Jan 19 2016 - Vasant Hegde <[email protected]> - 2.7.0
 - Move from EPL to the GNU GPL license
diff --git a/rtas_errd/config.c b/rtas_errd/config.c
index e3c89ea..3c00e51 100644
--- a/rtas_errd/config.c
+++ b/rtas_errd/config.c
@@ -117,7 +117,7 @@ get_token(char *str, char *str_end, char *tok, int *line_no)
 
 		case '\n':
 			/* Newlines are either token delimiters if we
-			 * have started reading a token, or a seperate token
+			 * have started reading a token, or a separate token
 			 * on its own.
 			 */
 			if (start == NULL) {
diff --git a/rtas_errd/ela.c b/rtas_errd/ela.c
index 8385770..ab5e825 100644
--- a/rtas_errd/ela.c
+++ b/rtas_errd/ela.c
@@ -476,7 +476,7 @@ has_epow_reset(struct event *event, int error_type)
 
 	erptr = epow_reset_list;
 
-	/* Search for an occurance of the error_type */
+	/* Search for an occurrence of the error_type */
 	while (erptr != NULL) {
 		if (erptr->err_type == (error_type & 0xFFFFFF00)) {
 			/* found a match */
@@ -1097,7 +1097,7 @@ process_pre_v6(struct event *event)
 			e_desc->rcode = 0;
 			post_error_code = *(int *)&event->event_buf[I_POSTCODE];
 
-			/* Add any (upto 4) chrp location codes from the log */
+			/* Add any (up to 4) chrp location codes from the log */
 			loc = get_loc_code(event, FIRST_LOC, NULL);
 			i = 0;
 			while (loc && i < 4) {
@@ -1368,7 +1368,7 @@ report_srn(struct event *event, int nlocs,
  *	The string of location codes is null terminated. However a special
  *	character, ">", means that the location codes that follow should not
  *	be reported to the user via diagnostics. Therefore, processing of 
- *	location codes will stop at the first occurance of ">" or a null 
+ *	location codes will stop at the first occurrence of ">" or a null 
  *	terminator.
  *
  * RETURNS:
@@ -1449,7 +1449,7 @@ get_loc_code(struct event *event, int mode, int *nlocs)
 	if (loc < end_loc && *loc != 0x0) {
 		/* loc is the start of a location code */
 		/* use start_loc to find end of location code string */
-		/* find 1st occurance of null or blank, the loc. code delimit */
+		/* find 1st occurrence of null or blank, the loc. code delimit */
 		while (*loc == ' ')
 			loc++;	/* skip leading blanks */
 
@@ -1688,7 +1688,7 @@ report_io_error_frus(struct event *event, int sn,
 		if (swap_locs) {
 			if (i == 0) {
 				/* 1st loc code goes in 2nd fru */
-				/* but also puting loc in 1st fru */
+				/* but also putting loc in 1st fru */
 				/* in case  there is only 1 loc. */
 				strcpy(e_desc->frus[0].floc, loc);
 				strcpy(e_desc->frus[1].floc, loc);
diff --git a/rtas_errd/ela_msg.h b/rtas_errd/ela_msg.h
index 6409a16..81a7ee1 100644
--- a/rtas_errd/ela_msg.h
+++ b/rtas_errd/ela_msg.h
@@ -203,12 +203,12 @@
     "\n%s\n\nThe system will shutdown in 10 minutes."
 
 #define MSGMENUG160 "651160 ANALYZING SYSTEM ERROR LOG\n" \
-    "A system shutdown occured due to a critical \n" \
+    "A system shutdown occurred due to a critical \n" \
     "environmental and power warning.\n" \
     "The following physical location codes were reported:\n\n%s"
 
 #define MSGMENUG161 "651161 ANALYZING SYSTEM ERROR LOG\n" \
-    "A system shutdown occured due to a critical \n" \
+    "A system shutdown occurred due to a critical \n" \
     "environmental and power warning."
 
 #define MSGEPOWB17b0C12 "Power fault due to unspecified cause."
diff --git a/rtas_errd/epow.c b/rtas_errd/epow.c
index a1f6c2e..0c30a36 100644
--- a/rtas_errd/epow.c
+++ b/rtas_errd/epow.c
@@ -176,7 +176,7 @@ parse_epow(struct event *event)
         if (rtas_hdr->extended == 0) {
 		if (state > 0) {
 			/* Assume a system halt */
-			log_epow(event, "Recieved shortened EPOW event, "
+			log_epow(event, "Received shortened EPOW event, "
 				 "assuming power failure");
 			return 10;
 		}
diff --git a/rtas_errd/extract_platdump.c b/rtas_errd/extract_platdump.c
index 1e294bf..b8be114 100644
--- a/rtas_errd/extract_platdump.c
+++ b/rtas_errd/extract_platdump.c
@@ -125,9 +125,9 @@ handle_platform_dump_error(int e, char *err_buf, int sz)
 		snprintf(err_buf, sz, "%s%s", err, "Kernel out of low memory");
 		break;
 
-	    case RTAS_FREE_ERR:	 /* attempt to free nonexistant rmo buffer */
+	    case RTAS_FREE_ERR:	 /* attempt to free nonexistent rmo buffer */
 		snprintf(err_buf, sz, "%s%s", err,
-			 "Attempt to free nonexistant rmo buffer");
+			 "Attempt to free nonexistent rmo buffer");
 		break;
 
 	    case RTAS_IO_ASSERT:  /* unexpected I/O error */
@@ -251,7 +251,7 @@ extract_platform_dump(uint64_t dump_tag)
 	seq = seq_next;
 
 	/* 
-	 * Retreive the prefix size and suggested filename for the dump
+	 * Retrieve the prefix size and suggested filename for the dump
 	 * from the dump header 
 	 */
 	if (bytes >= DUMP_HDR_PREFIX_OFFSET + sizeof(uint16_t)) {
diff --git a/rtas_errd/files.c b/rtas_errd/files.c
index a095362..ecb99f6 100644
--- a/rtas_errd/files.c
+++ b/rtas_errd/files.c
@@ -87,7 +87,7 @@ char *epow_status_file = "/var/log/epow_status";
  * @brief buffer to hold scanlog dump path
  * 
  * This is a buffer that is allocated and filled when rtas_errd is 
- * intially exec()'ed via check_scanlog_dump(). The buffer will contain 
+ * initially exec()'ed via check_scanlog_dump(). The buffer will contain 
  * the path to a scanlog dump and is reported with the first RTAS event 
  * we receive from the kernel.
  */
@@ -532,7 +532,7 @@ reformat_msg(char *msg)
  * the rtas_event structure if this message is directly related a rtas
  * event and a formatted message a la printf() style.  Please make sure
  * that the message passed in does not have any ending punctuation or
- * ends with a newline.  It sould also not have any internal newlines.
+ * ends with a newline.  It should also not have any internal newlines.
  *
  * This routine will do several things to the message before printing
  * it out;
@@ -618,7 +618,7 @@ _log_msg(struct event *event, const char *fmt, va_list ap)
 		if (rc == 0) {
 			rc = unlink(rtas_errd_log0);
 			if (rc == -1) {
-				log_msg(NULL, "An error occured during the "
+				log_msg(NULL, "An error occurred during the "
 					"rotation of the rtas_errd logs:\n "
 					"cmd = rm %s\nexit status: %d)",
 					rtas_errd_log0, errno);
@@ -630,7 +630,7 @@ _log_msg(struct event *event, const char *fmt, va_list ap)
 		 */
 		rc = rename(rtas_errd_log, rtas_errd_log0);
 		if (rc == -1) {
-			log_msg(NULL, "An error occured during rotation of "
+			log_msg(NULL, "An error occurred during rotation of "
 				"rtas_errd logs (logger alive):\n cmd = rename"
 				" %s %s\nexit status: %d)", rtas_errd_log,
 				rtas_errd_log0, errno);
diff --git a/rtas_errd/update.c b/rtas_errd/update.c
index 34a12a6..e487e4e 100644
--- a/rtas_errd/update.c
+++ b/rtas_errd/update.c
@@ -122,7 +122,7 @@ find_event(char *str, int strlen, char *text, int textlen, int bad_char[])
 			return &text[j];
 		else
 			/* Since we're not using the good suffix rule
-			 * we need to gaurantee progress.
+			 * we need to guarantee progress.
 			 */
                         j += MAX(1, bad_char[(int)text[i+j]] - strlen + 1 + i);
 	}
@@ -198,7 +198,7 @@ get_rtas_no(char *ptr)
 
 /**
  * update_rtas_msgs
- * @brief Update RTAS messages in the platfrom log
+ * @brief Update RTAS messages in the platform log
  *
  * Update the file /var/log/platform with any RTAS events
  * found in syslog that have not been handled by rtas_errd.
@@ -299,7 +299,7 @@ update_rtas_msgs(void)
 	}
 
 	if (last_p == NULL) {
-		dbg("%s does not conatin any RTAS events", messages_log);
+		dbg("%s does not contain any RTAS events", messages_log);
 		goto cleanup;
 	}
 
diff --git a/rules.mk b/rules.mk
index f3c8334..b69509c 100644
--- a/rules.mk
+++ b/rules.mk
@@ -9,7 +9,7 @@ DOXYGEN = `which doxygen`
 # Name of the rpm spec file
 SPECFILENAME = ppc64-diag.spec
 
-# resolves the root directory at which this build is occuring
+# resolves the root directory at which this build is occurring
 ROOT_DIR =                                              \
         $(shell                                         \
         while [ `pwd` != "/" ];                         \
-- 
2.1.4


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e