All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] ctrl-c detection (on 4xx platforms)
Date: Thu, 11 Sep 2008 17:23:53 +0200	[thread overview]
Message-ID: <200809111723.54133.matthias.fuchs@esd-electronics.com> (raw)

Hi,

I noticed some strange CTRL-C behavior in a BSP command. 
When I run my bsp command interactively everything is fine.
The command waits for a condition and displays a rotating cursor
(see board/esd/common/cmd_loadpci.c):

...
int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	...
	char str[] = "\\|/-";
	...

	while(1) {
		...
		*ptr = 0xffffffff;
		puts("\nWaiting for action from pci host -");

		/*
		 * Wait for host to write the start address
		 */
		while (*ptr == 0xffffffff) {
			count++;
			if (!(count % 100)) {
				count2++;
				putc(0x08); /* backspace */
				putc(str[count2 % 4]);
			}

			/* Abort if ctrl-c was pressed */
			if (ctrlc()) {
				puts("\nAbort\n");
				return 0;
			}

			udelay(1000);
		}
	}
	...
}

But when I call this bsp command as bootcmd CTRL-C does not stop the while loop. So CTRL-C 
is not detected. Any idea?

Matthias

             reply	other threads:[~2008-09-11 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-11 15:23 Matthias Fuchs [this message]
2008-09-11 20:55 ` [U-Boot] ctrl-c detection (on 4xx platforms) Wolfgang Denk
2008-09-12  7:00   ` Matthias Fuchs
2008-09-12  7:55     ` Matthias Fuchs
2008-09-12  9:08       ` Wolfgang Denk
2008-09-13 16:51         ` Matthias Fuchs

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=200809111723.54133.matthias.fuchs@esd-electronics.com \
    --to=matthias.fuchs@esd-electronics.com \
    --cc=u-boot@lists.denx.de \
    /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 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.