Hi, Can anyone help me figure out the problem I'm having with a function call?
I have a header file, which sets an enum:
typedef enum {INFO, WARNING, FATAL} Levels;
int log_event (Levels, char *fmt, ...);
..then the function is called this way:
log_event(INFO, "Message text");
... (6 Replies)
I want to know if there is any documentation or any type of information that can give a list of all of the return codes that can be seen in the /var/cron/log. I have seen a couple in my log file. Example: rc=1 and rc=64. (2 Replies)
hi friends,
I writing a script, one of the function there is:
###################################
########### Return 1 if has subfolders and 0 otherwise ##################
# Get one Argument - Folder name
Has_Subfolders()
{
count=0
cd $1
for zont in `ls -l | grep drw | awk... (1 Reply)
Hello,
I have a problem with package and name space.
require "/Mehran/DSGateEngineLib/general.pl";
use strict;
sub System_Status_Main_Service_Status_Intrusion_Prevention
{
my %idpstatus;
my @result;
&General_ReadHash("/var/dsg/idp/settings",\%idpstatus);
#print... (4 Replies)
Below is my script that is function properly per my conditions but I am facing one problem here that is when one function fails then Iy should not check other functions but it calls the other function too So anyone can help me how could i achieve this?
iNOUT i AM GIVING TO THE... (1 Reply)
Why does this work:
awk 'NR==3 sub(FS $NF,x)' inputfile
But not this:
var=3
awk -v i=$var 'NR==i sub(FS $NF,x)' inputfile
How would you do the same thing as the first line of code, but with a variable? (2 Replies)
Hi I have a function :
Make_Report()
{
trx_report=`sqlplus -s $conn_str << @@
set echo off;
set pages 0;
set feedback off;
set verify off;
select srv_trx_s_no,... (1 Reply)
Not sure where the problem is. I can run the script without any issue using the following command.
. /opt/app/scripts/cdc_migration.sh
But it fails with the below error when I try it this way
/opt/app/scripts/cdc_migration.sh
/opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT FREEBSD
elf_getscn
ELF_GETSCN(3) BSD Library Functions Manual ELF_GETSCN(3)NAME
elf_getscn, elf_ndxscn, elf_newscn, elf_nextscn -- get/allocate section information for an ELF object
LIBRARY
ELF Access Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h>
Elf_Scn *
elf_getscn(Elf *elf, size_t index);
size_t
elf_ndxscn(Elf_Scn *scn);
Elf_Scn *
elf_newscn(Elf *elf);
Elf_Scn *
elf_nextscn(Elf *elf, Elf_Scn *scn);
DESCRIPTION
These functions are used to iterate through the sections associated with an ELF descriptor.
Function elf_getscn() will return a section descriptor for the section at index index in the object denoted by ELF descriptor elf. An error
will be signalled if the specified section does not exist.
Function elf_ndxscn() returns the section table index associated with section descriptor scn.
Function elf_newscn() creates a new section and appends it to the list of sections associated with descriptor elf. The library will automat-
ically increment the e_shnum field of the ELF header associated with descriptor elf, and will set the ELF_F_DIRTY flag on the returned sec-
tion descriptor. For ELF descriptors opened for writing, the ELF library will automatically create an empty section at index zero
(SHN_UNDEF) on the first call to elf_newscn().
Function elf_nextscn() takes a section descriptor scn and returns a pointer to the section descriptor at the next higher index. Argument scn
is allowed to be NULL, in which case this function will return a pointer to the section descriptor at index 1. If no further sections are
present, function elf_nextscn() will return a NULL pointer.
RETURN VALUES
Functions elf_getscn(), elf_newscn() and elf_nextscn() return a valid pointer to a section descriptor if successful, or NULL if an error
occurs.
Function elf_ndxscn() returns a valid section table index if successful, or SHN_UNDEF if an error occurs.
ERRORS
These functions may fail with the following errors:
[ELF_E_ARGUMENT] Arguments elf or scn were NULL.
[ELF_E_ARGUMENT] Argument index exceeded the current number of sections in the ELF object.
[ELF_E_ARGUMENT] Argument elf was not a descriptor for an ELF file.
[ELF_E_ARGUMENT] Section descriptor scn was not associated with ELF descriptor elf.
[ELF_E_CLASS] Descriptor elf was of an unknown ELF class.
[ELF_E_SECTION] Argument elf specified extended section numbering in the ELF header with the section header at index SHN_UNDEF not being of
type SHT_NULL.
SEE ALSO elf(3), elf_flagdata(3), elf_flagscn(3), elf_getdata(3), elf_getshdr(3), gelf(3)BSD October 22, 2007 BSD