Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Ralf Rösch" <ralf.roesch@rw-gmbh.de>
To: linux-mips@linux-mips.org
Subject: [PATCH] rtc.h: fixes to make genrtc.c compilable
Date: Tue, 28 Mar 2006 16:54:52 +0200	[thread overview]
Message-ID: <44294E3C.8010602@rw-gmbh.de> (raw)
In-Reply-To: <4427A31F.9080801@ru.mvista.com>

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

patch below makes genrtc.c compilable again
--
Ralf Roesch


diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h
index a2abc45..82ad401 100644
--- a/include/asm-mips/rtc.h
+++ b/include/asm-mips/rtc.h
@@ -32,7 +32,7 @@ static inline unsigned int get_rtc_time(
  {
         unsigned long nowtime;

-       nowtime = rtc_get_time();
+       nowtime = rtc_mips_get_time();
         to_tm(nowtime, time);
         time->tm_year -= 1900;

@@ -47,7 +47,7 @@ static inline int set_rtc_time(struct rt
         nowtime = mktime(time->tm_year+1900, time->tm_mon+1,
                         time->tm_mday, time->tm_hour, time->tm_min,
                         time->tm_sec);
-       ret = rtc_set_time(nowtime);
+       ret = rtc_mips_set_time(nowtime);

         return ret;
  }


[-- Attachment #2: Au1xx0-fix-prom_getenv.patch --]
[-- Type: text/plain, Size: 1384 bytes --]

diff --git a/arch/mips/au1000/common/prom.c b/arch/mips/au1000/common/prom.c
index 9c171af..ae7d8c5 100644
--- a/arch/mips/au1000/common/prom.c
+++ b/arch/mips/au1000/common/prom.c
@@ -1,10 +1,9 @@
 /*
  *
  * BRIEF MODULE DESCRIPTION
- *    PROM library initialisation code, assuming a version of
- *    pmon is the boot code.
+ *    PROM library initialisation code, assuming YAMON is the boot loader.
  *
- * Copyright 2000,2001 MontaVista Software Inc.
+ * Copyright 2000, 2001, 2006 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *         	ppopov@mvista.com or source@mvista.com
  *
@@ -49,9 +48,9 @@ extern char **prom_argv, **prom_envp;
 
 typedef struct
 {
-    char *name;
-/*    char *val; */
-}t_env_var;
+	char *name;
+	char *val;
+} t_env_var;
 
 
 char * prom_getcmdline(void)
@@ -85,21 +84,16 @@ char *prom_getenv(char *envname)
 {
 	/*
 	 * Return a pointer to the given environment variable.
-	 * Environment variables are stored in the form of "memsize=64".
 	 */
 
 	t_env_var *env = (t_env_var *)prom_envp;
-	int i;
-
-	i = strlen(envname);
 
-	while(env->name) {
-		if(strncmp(envname, env->name, i) == 0) {
-			return(env->name + strlen(envname) + 1);
-		}
+	while (env->name) {
+		if (strcmp(envname, env->name) == 0)
+			return env->val;
 		env++;
 	}
-	return(NULL);
+	return NULL;
 }
 
 inline unsigned char str2hexnum(unsigned char c)




  parent reply	other threads:[~2006-03-28 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-27  7:43 [PATCH] small time list process error in prom_getenv() Freddy Spierenburg
2006-03-27  8:32 ` Sergei Shtylylov
2006-03-27 18:44   ` [PATCH] Au1xx0: fix prom_getenv() to handle YAMON style environment Sergei Shtylylov
2006-03-28 14:54   ` Ralf Rösch [this message]
2006-03-28 15:12   ` [PATCH] rtc.h: fixes to make genrtc.c compilable Ralf Rösch
2006-03-28 15:14     ` Sergei Shtylylov
2006-03-30 15:02   ` [PATCH] small time list process error in prom_getenv() Sergei Shtylyov
2006-03-31 21:20   ` [PATCH] Au1550: make OSS drivers look pretty on loading Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44294E3C.8010602@rw-gmbh.de \
    --to=ralf.roesch@rw-gmbh.de \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox