~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to grub-core/commands/cat.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
  grub_file_t file;
42
42
  char buf[GRUB_DISK_SECTOR_SIZE];
43
43
  grub_ssize_t size;
44
 
  int key = 0;
 
44
  int key = GRUB_TERM_NO_KEY;
45
45
 
46
46
  if (state[0].set)
47
47
    dos = 1;
48
48
 
49
49
  if (argc != 1)
50
 
    return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
 
50
    return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
51
51
 
52
52
  file = grub_file_open (args[0]);
53
53
  if (! file)
77
77
            }
78
78
        }
79
79
 
80
 
      while (grub_checkkey () >= 0 &&
81
 
             (key = grub_getkey ()) != GRUB_TERM_ESC)
82
 
        ;
 
80
      do
 
81
        key = grub_getkey_noblock ();
 
82
      while (key != GRUB_TERM_ESC && key != GRUB_TERM_NO_KEY);
83
83
    }
84
84
 
85
85
  grub_xputs ("\n");