Sponsored Content
Full Discussion: QEMU not booting my image
Special Forums Hardware Filesystems, Disks and Memory QEMU not booting my image Post 302487828 by neur0n on Thursday 13th of January 2011 05:17:54 PM
Old 01-13-2011
Yea, they have a demo image. I don't intend to just boot a demo and stop there I want to know this stuff for when my project progresses. But anyways thanks a lot for all your help.

Last edited by neur0n; 01-13-2011 at 06:32 PM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

2. UNIX for Dummies Questions & Answers

Anyone ever used qemu and networked it ?

hi i got a virtual linux machine running on qemu my problem is connecting it to the internet im a bit confused weather i have to make a virtual network card in qemu and than tun tap it? can anyone thats done it before help me out? (1 Reply)
Discussion started by: russian460
1 Replies

3. Programming

Qemu + gdb

Hi, I got: host machine: RedHat (RHEL6) virtual machine: RedHat (RHEL6) I run (on host machine): qemu-system-x86_64 ...... -S -s after that i run (on host machine): gdb target remote localhost:1234 set architecture i386:x86-64 and then i can use (on host machine) 'ctrl + c' to... (2 Replies)
Discussion started by: Chrisdot
2 Replies

4. Solaris

Dual Booting - Solaris image CD doesn't read in BIOS

I am trying to install solaris 10-x86 as second OS on top of Windows XP. I have downloaded iso image from Oracle website and burned into bootable cd. when I loaded into CD-drive and made changes in BIOS to boot from CD. Its not reading from CD drive. After restarting the system with CD(solaris... (8 Replies)
Discussion started by: SunSolars_admin
8 Replies

5. Shell Programming and Scripting

matching image files to create one image

Hi, I have two sets of image files. Both sets have names A to Z but set 1 ends with .cdt.png and set 2 ends with .matrix.png. I want set 1 to match with set 2 if the names match (i.e. A.cdt.png will match with A.matrix.png) and with the convert image tool (program for images), it will merge the... (6 Replies)
Discussion started by: kylle345
6 Replies

6. IP Networking

Create a Bridge for Qemu using only loopback

hello networking folks, i have 3 virtual machines that need to talk to each other How can i create a bridge to loopback ? -net tap,vlan=0,ifname=tap1 where tap1 is connected to lo:1 , tap2 is connected to lo:2 etc thx (0 Replies)
Discussion started by: TwiceDone
0 Replies

7. Virtualization and Cloud Computing

QEMU performance?

Heyas So, i like doing custom a LiveImage of my OS. Using Redhats kickstart/livecd-creator method. Anyway, so i would like to test the liveimages... AND also, i WOULD like to install FreeBSD, Solaris, or whatever, onto a Virtual Machine. I used to use Oracles Virtualbox, but eversince... (3 Replies)
Discussion started by: sea
3 Replies

8. BSD

How to install Ultrix 4.2 on Qemu?

Hi Problem changed. I've got a message showing on the screen which says Guest has not initialized the display (yet) Any how I can fix this? Thanks Jack (4 Replies)
Discussion started by: lucky7456969
4 Replies
CGI::ValidOp::Check(3pm)				User Contributed Perl Documentation				  CGI::ValidOp::Check(3pm)

NAME
CGI::ValidOp::Check - base class for CGI::ValidOp checks SYNOPSIS
package CGI::ValidOp::Check::demo; use base qw/ CGI::ValidOp::Check /; sub default { ( qr/^demo$/, # validator '$label must equal "demo."', # error message ) } sub color { my $self = shift; ( sub { my( $value, $color ) = @_; $self->pass( $1 ) if $value =~ /^($color)$/i; $self->fail( "$label must be the color: $color." ); }, ) } DESCRIPTION
CGI::ValidOp::Check contains all the code to validate data from CGI::ValidOp::Param objects, and enables simple creation your own checks. Unless you're creating or testing your own checks, you should use and read the documentation for CGI::ValidOp instead. How checks are used Each check module must contain at least one check, and can contain as many as you care to create. This document walks through the creation of one module containing mutliple checks. Some of ValidOp's default checks are organized by types of data (e.g. 'text', 'number'), but there's nothing to say you must also do this. You may find it convenient to package all the checks for one project in a single module. Your check can be used in three ways. The first is with a simple scalar corresponding to the module name: $validop->param( 'price', [ 'mychecks' ]); The second is by calling a particular check within the package: $validop->param( 'price', [ 'mychecks::robot' ]); The third is by passing parameters to either the module or a check: $validop->param( 'price', [ 'mychecks(3,6)' ]); $validop->param( 'price', [ 'mychecks::robot("Robbie")' ]); METHODS
Unless you're creating or testing your own checks, this reference is not likely to help you. You can use ValidOp's public API without knowing a thing about ValidOp::Check's internals. params() The 'params' method returns a list passed to the check by the user: $validop->param( 'price', [ 'mychecks(3,6)' ]); These parameters are captured by splitting the contents of the parenthesis on commas. The resulting list is made available with the 'params' method. validator( $regexp_or_coderef ) Sets or returns the validator. errmsg( $error_message ) Sets or returns the error message. When CGI::ValidOp::Param parses these error messages, it replaces every isntance of $label with the parameter's 'label' property or, if that does not exist, with the parameter's 'name'. check( $tainted_value ) check() runs its calling object's validator against the incoming tainted value. It returns the resulting value on success, or "undef" on failure. check() itself does very little work; it finds what type of validator it has (regex and coderef are the only types currently allowed) and farms out the work to the appropriate method. check_regexp( $tainted, $validator ) check_regexp() captures the result of matching $tainted against $validator, using code similar to this: $tainted =~ /($validator)/; return $1; Note that the return value is untainted. Also note that the code does not anchor the regular expression with ^ (at the beginning) or $ (at the end). In other words, if you used this quoted regex as a check: qr/demo/ any string containing "demo" (e.g. "demographics," "modemophobia") would pass. This may or may not be what you intend. check_code( $tainted, $validator ) check_code() passes $tainted to the anonymous subroutine referenced by $validator and returns the result. The two most notable differences from regex checks are that the value of params() is passed into the validator subroutine and that the entire thing croaks if the return value is tainted. ValidOp's default behavior is to die like a dog if your coderef returns a tainted value. This safe default can be changed by returning a third list item from your check subroutine, a hashref of additional properties: sub should_allow_tainted {( sub { $_[ 0 ] }, 'This should be an error message', { allow_tainted => 1, } )} is_tainted CREATING A CHECK MODULE
Starting a check module For the moment, your check module must be in the CGI::ValidOp::Check namespace; future versions will allow more flexibility. The module must be in Perl's search path. package CGI::ValidOp::Check::demo; You must subclass CGI::ValidOp::Check for your module. It contains methods that the rest of the code uses to perform the validation. use base qw/ CGI::ValidOp::Check /; Creating checks Each check is completely defined by a single subroutine. If you define only one check in your module, it should be called 'default'. Using only the module name as a check, the 'default' subroutine is called. There's nothing to stop you calling your single check something else, but it does mean less intuitive use. Checks return one to three scalar values. The first value is the check itself, and is required. The second value is an optional error message. The third is an optional list of additional properties, defined for the check and made available as methods. sub check_name { ( $check, $errmsg, \%options ) } Types of checks Quoted regular expression The simplest checks are quoted regular expressions. These are perfect for relatively static data. This one checks that the incoming value is "demo" and sets a custom error message. Any instance of '$label' in an error message is substituted with the parameter's 'label' property, if you define one, or the parameter's 'name' property (which is required and thus guaranteed to exist). sub default { ( qr/^demo$/, # validator '$label must equal "demo."', # error message ) } Parameters are validated against Regex checks with the check_regexp method. You cannot pass parameters to a regex check (more to the point you can, but they'll be ignored). Subroutine reference These checks can be much more powerful and flexible, but require a little extra work. sub color { my $self = shift; ( sub { my( $value, $color ) = @_; return $1 if $value =~ /^($color)$/i; $self->errmsg( "$label must be the color: $color." ); return; }, ) } You'll note that the check only returns one item, an anonymous subroutine. This coderef sets the check's error message with the 'errmsg' method, allowing it to pass incoming parameters into the error message. (You could supply an error message here as the second array element, but it would be overridden.) Parameters are validated against coderef checks with the check_code method: Right now the only additional property available ValidOp checks is 'allow_tainted.' ValidOp's stock 'length' check uses this, reasoning that just knowing the length of an incoming value isn't reason enough to trust it. package Main; my $demo = CGI::ValidOp::Check::demo->new; is( $demo->check( 'failure' ), undef ); is( $demo->check( 'demo' ), 'demo' ); my $value = $demo->check( 'demo' ); ok( ! $demo->is_tainted( $value )); my $demo_color = CGI::ValidOp::Check::demo->new( 'color', 'red' ); is( $demo_color->check( 'green' ), undef ); is( $demo_color->errmsg, '$label must be the color: red.' ); is( $demo_color->check( 'red' ), 'red' ); AUTHOR
Randall Hansen <legless@cpan.org> COPYRIGHT
Copyright (c) 2003-2005 Randall Hansen. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.10.1 2009-11-30 CGI::ValidOp::Check(3pm)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy