Skip to content

Commit

Permalink
misc: Replace all remaining instances of 'cgminer' with 'sgminer'.
Browse files Browse the repository at this point in the history
sed again.
  • Loading branch information
veox committed Jan 15, 2014
1 parent 6ea3b93 commit 50066cf
Show file tree
Hide file tree
Showing 15 changed files with 83 additions and 83 deletions.
Binary file modified MCast.class
Binary file not shown.
4 changes: 2 additions & 2 deletions MCast.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static public void usAge()
System.err.println("usAge: java MCast [-v] [code [toaddr [port [replyport [wait]]]]]");
System.err.println(" -v=report elapsed ms to last reply");
System.err.println(" Anything below missing or blank will use it's default");
System.err.println(" code=X in cgminer-X-Port default="+MCAST_CODE);
System.err.println(" code=X in sgminer-X-Port default="+MCAST_CODE);
System.err.println(" toaddr=multicast address default="+MCAST_ADDR);
System.err.println(" port=multicast port default="+MCAST_PORT);
System.err.println(" replyport=local post to listen for replies default="+MCAST_REPORT);
Expand Down Expand Up @@ -188,7 +188,7 @@ public void sendMCast()
{
try
{
String message = new String("cgminer-" + code + "-" + report);
String message = new String("sgminer-" + code + "-" + report);
MulticastSocket socket = null;
DatagramPacket packet = null;

Expand Down
2 changes: 1 addition & 1 deletion adl.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ int gpu_fanpercent(int gpu)
/* Recursive calling applog causes a hang, so disable messages */
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
if (opt_restart) {
applog(LOG_WARNING, "Restart enabled, will attempt to restart cgminer");
applog(LOG_WARNING, "Restart enabled, will attempt to restart sgminer");
applog(LOG_WARNING, "You can disable this with the --no-restart option");
app_restart();
}
Expand Down
2 changes: 1 addition & 1 deletion api-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

/* Compile:
* gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api
* gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o sgminer-api
*/

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion api-example.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
#
# Sample Socket I/O to CGMiner API
# Sample Socket I/O to sgminer API
#
function getsock($addr, $port)
{
Expand Down
2 changes: 1 addition & 1 deletion api-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Foundation; either version 3 of the License, or (at your option) any later
# version. See COPYING for more details.

#Short Python Example for connecting to The Cgminer API
#Short Python Example for connecting to The sgminer API
#Written By: setkeh <https://github.com/setkeh>
#Thanks to Jezzz for all his Support.
#NOTE: When adding a param with a pipe | in bash or ZSH you must wrap the arg in quotes
Expand Down
20 changes: 10 additions & 10 deletions api.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ struct CODES {
{ SEVERITY_ERR, MSG_NOGPUADL,PARAM_GPU, "GPU %d does not have ADL" },
{ SEVERITY_ERR, MSG_INVINT, PARAM_STR, "Invalid intensity (%s) - must be '" _DYNAMIC "' or range " MIN_INTENSITY_STR " - " MAX_INTENSITY_STR },
{ SEVERITY_INFO, MSG_GPUINT, PARAM_BOTH, "GPU %d set new intensity to %s" },
{ SEVERITY_SUCC, MSG_MINECONFIG,PARAM_NONE, "CGMiner config" },
{ SEVERITY_SUCC, MSG_MINECONFIG,PARAM_NONE, "sgminer config" },
{ SEVERITY_ERR, MSG_GPUMERR, PARAM_BOTH, "Setting GPU %d memoryclock to (%s) reported failure" },
{ SEVERITY_SUCC, MSG_GPUMEM, PARAM_BOTH, "Setting GPU %d memoryclock to (%s) reported success" },
{ SEVERITY_ERR, MSG_GPUEERR, PARAM_BOTH, "Setting GPU %d clock to (%s) reported failure" },
Expand Down Expand Up @@ -409,13 +409,13 @@ struct CODES {
{ SEVERITY_SUCC, MSG_REMPOOL, PARAM_BOTH, "Removed pool %d:'%s'" },
{ SEVERITY_SUCC, MSG_NOTIFY, PARAM_NONE, "Notify" },
{ SEVERITY_SUCC, MSG_DEVDETAILS,PARAM_NONE, "Device Details" },
{ SEVERITY_SUCC, MSG_MINESTATS,PARAM_NONE, "CGMiner stats" },
{ SEVERITY_SUCC, MSG_MINESTATS,PARAM_NONE, "sgminer stats" },
{ SEVERITY_ERR, MSG_MISCHK, PARAM_NONE, "Missing check cmd" },
{ SEVERITY_SUCC, MSG_CHECK, PARAM_NONE, "Check command" },
{ SEVERITY_ERR, MSG_MISBOOL, PARAM_NONE, "Missing parameter: true/false" },
{ SEVERITY_ERR, MSG_INVBOOL, PARAM_NONE, "Invalid parameter should be true or false" },
{ SEVERITY_SUCC, MSG_FOO, PARAM_BOOL, "Failover-Only set to %s" },
{ SEVERITY_SUCC, MSG_MINECOIN,PARAM_NONE, "CGMiner coin" },
{ SEVERITY_SUCC, MSG_MINECOIN,PARAM_NONE, "sgminer coin" },
{ SEVERITY_SUCC, MSG_DEBUGSET,PARAM_NONE, "Debug settings" },
{ SEVERITY_SUCC, MSG_SETCONFIG,PARAM_SET, "Set config '%s' to %d" },
{ SEVERITY_ERR, MSG_UNKCON, PARAM_STR, "Unknown config '%s'" },
Expand Down Expand Up @@ -2197,7 +2197,7 @@ static void poolpriority(struct io_data *io_data, __maybe_unused SOCKETTYPE c, c
char *ptr, *next;
int i, pr, prio = 0;

// TODO: all cgminer code needs a mutex added everywhere for change
// TODO: all sgminer code needs a mutex added everywhere for change
// access to total_pools and also parts of the pools[] array,
// just copying total_pools here wont solve that

Expand Down Expand Up @@ -2725,7 +2725,7 @@ void dosave(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, b
ptr = NULL;
}

static int itemstats(struct io_data *io_data, int i, char *id, struct cgminer_stats *stats, struct cgminer_pool_stats *pool_stats, struct api_data *extra, struct cgpu_info *cgpu, bool isjson)
static int itemstats(struct io_data *io_data, int i, char *id, struct sgminer_stats *stats, struct sgminer_pool_stats *pool_stats, struct api_data *extra, struct cgpu_info *cgpu, bool isjson)
{
struct api_data *root = NULL;
char buf[TMPBUFSIZ];
Expand Down Expand Up @@ -2795,15 +2795,15 @@ static void minerstats(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
extra = NULL;

sprintf(id, "%s%d", cgpu->drv->name, cgpu->device_id);
i = itemstats(io_data, i, id, &(cgpu->cgminer_stats), NULL, extra, cgpu, isjson);
i = itemstats(io_data, i, id, &(cgpu->sgminer_stats), NULL, extra, cgpu, isjson);
}
}

for (j = 0; j < total_pools; j++) {
struct pool *pool = pools[j];

sprintf(id, "POOL%d", j);
i = itemstats(io_data, i, id, &(pool->cgminer_stats), &(pool->cgminer_pool_stats), NULL, NULL, isjson);
i = itemstats(io_data, i, id, &(pool->sgminer_stats), &(pool->sgminer_pool_stats), NULL, NULL, isjson);
}

if (isjson && io_open)
Expand Down Expand Up @@ -3437,7 +3437,7 @@ static void *quit_thread(__maybe_unused void *userdata)
mutex_unlock(&quit_restart_lock);

if (opt_debug)
applog(LOG_DEBUG, "API: killing cgminer");
applog(LOG_DEBUG, "API: killing sgminer");

kill_work();

Expand All @@ -3451,7 +3451,7 @@ static void *restart_thread(__maybe_unused void *userdata)
mutex_unlock(&quit_restart_lock);

if (opt_debug)
applog(LOG_DEBUG, "API: restarting cgminer");
applog(LOG_DEBUG, "API: restarting sgminer");

app_restart();

Expand Down Expand Up @@ -3503,7 +3503,7 @@ static void mcast()
bool addrok;
char group;

char expect[] = "cgminer-"; // first 8 bytes constant
char expect[] = "sgminer-"; // first 8 bytes constant
char *expect_code;
size_t expect_code_len;
char buf[1024];
Expand Down
2 changes: 1 addition & 1 deletion bench_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define __BENCH_BLOCK_H__ 1

// Random work pulled from a pool
#define CGMINER_BENCHMARK_BLOCK \
#define SGMINER_BENCHMARK_BLOCK \
0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0xD8, 0x07, 0x17, 0xC9, 0x13, 0x6F, 0xDC, 0xBE, 0xDE, 0xB7, \
0xB2, 0x14, 0xEF, 0xD1, 0x72, 0x7F, 0xA3, 0x72, 0xB2, 0x5D, 0x88, 0xF0, 0x00, 0x00, 0x05, 0xAA, \
0x00, 0x00, 0x00, 0x00, 0x92, 0x8B, 0x4C, 0x77, 0xF5, 0xB2, 0xE6, 0x56, 0x96, 0x27, 0xE0, 0x66, \
Expand Down
2 changes: 1 addition & 1 deletion driver-opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ static bool opencl_thread_prepare(struct thr_info *thr)
applog(LOG_ERR, "Failed to init GPU thread %d, disabling device %d", i, gpu);
if (!failmessage) {
applog(LOG_ERR, "Restarting the GPU from the menu will not fix this.");
applog(LOG_ERR, "Try restarting cgminer.");
applog(LOG_ERR, "Try restarting sgminer.");
failmessage = true;
#ifdef HAVE_CURSES
char *buf;
Expand Down
14 changes: 7 additions & 7 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,15 @@ enum dev_reason {

#define MIN_SEC_UNSET 99999999

struct cgminer_stats {
struct sgminer_stats {
uint32_t getwork_calls;
struct timeval getwork_wait;
struct timeval getwork_wait_max;
struct timeval getwork_wait_min;
};

// Just the actual network getworks to the pool
struct cgminer_pool_stats {
struct sgminer_pool_stats {
uint32_t getwork_calls;
uint32_t getwork_attempts;
struct timeval getwork_wait;
Expand All @@ -436,7 +436,7 @@ struct cgminer_pool_stats {
};

struct cgpu_info {
int cgminer_id;
int sgminer_id;
struct device_drv *drv;
int device_id;
char *name;
Expand Down Expand Up @@ -517,7 +517,7 @@ struct cgpu_info {
int dev_comms_error_count;
int dev_throttle_count;

struct cgminer_stats cgminer_stats;
struct sgminer_stats sgminer_stats;

pthread_rwlock_t qlock;
struct work *queued_work;
Expand Down Expand Up @@ -951,7 +951,7 @@ extern bool opt_protocol;
extern bool have_longpoll;
extern char *opt_kernel_path;
extern char *opt_socks_proxy;
extern char *cgminer_path;
extern char *sgminer_path;
extern bool opt_fail_only;
extern bool opt_autofan;
extern bool opt_autoengine;
Expand Down Expand Up @@ -1214,8 +1214,8 @@ struct pool {
double last_share_diff;
uint64_t best_diff;

struct cgminer_stats cgminer_stats;
struct cgminer_pool_stats cgminer_pool_stats;
struct sgminer_stats sgminer_stats;
struct sgminer_pool_stats sgminer_pool_stats;

/* The last block this particular pool knows about */
char prev_block[32];
Expand Down
22 changes: 11 additions & 11 deletions miner.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$title = 'Mine';
#
# Set $readonly to true to force miner.php to be readonly
# Set $readonly to false then it will check cgminer 'privileged'
# Set $readonly to false then it will check sgminer 'privileged'
$readonly = false;
#
# Set $userlist to null to allow anyone access or read API-README
Expand All @@ -44,7 +44,7 @@
# N.B. also if $readonly is true, it will not display the fields
$poolinputs = false;
#
# Set $rigs to an array of your cgminer rigs that are running
# Set $rigs to an array of your sgminer rigs that are running
# format: 'IP:Port' or 'Host:Port' or 'Host:Port:Name'
$rigs = array('127.0.0.1:4028');
#
Expand All @@ -54,16 +54,16 @@
# Set $mcastexpect to at least how many rigs you expect it to find
$mcastexpect = 0;
#
# API Multicast address all cgminers are listening on
# API Multicast address all sgminers are listening on
$mcastaddr = '224.0.0.75';
#
# API Multicast UDP port all cgminers are listening on
# API Multicast UDP port all sgminers are listening on
$mcastport = 4028;
#
# The code all cgminers expect in the Multicast message sent
# The code all sgminers expect in the Multicast message sent
$mcastcode = 'FTW';
#
# UDP port cgminers are to reply on (by request)
# UDP port sgminers are to reply on (by request)
$mcastlistport = 4027;
#
# Set $mcasttimeout to the number of seconds (floating point)
Expand Down Expand Up @@ -437,7 +437,7 @@ function mcastrigs()
return;
}

$buf = "cgminer-$mcastcode-$mcastlistport";
$buf = "sgminer-$mcastcode-$mcastlistport";
socket_sendto($mcast_soc, $buf, strlen($buf), 0, $mcastaddr, $mcastport);
socket_close($mcast_soc);

Expand Down Expand Up @@ -1569,7 +1569,7 @@ function rigbutton($rig, $rigname, $when, $row)
#
function showrigs($anss, $headname, $rigname)
{
$dthead = array($headname => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1, 'API' => 1, 'CGMiner' => 1);
$dthead = array($headname => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1, 'API' => 1, 'sgminer' => 1);
showhead('', $dthead);

foreach ($anss as $rig => $ans)
Expand Down Expand Up @@ -1850,8 +1850,8 @@ function pagebuttons($rig, $pg)
$rg = '';
if (count($rigs) > 1)
$rg = " Rig $rig";
echo "<input type=button value='Restart' onclick='prc(\"restart&rig=$rig\",\"Restart CGMiner$rg\")'>";
echo "&nbsp;<input type=button value='Quit' onclick='prc(\"quit&rig=$rig\",\"Quit CGMiner$rg\")'>";
echo "<input type=button value='Restart' onclick='prc(\"restart&rig=$rig\",\"Restart sgminer$rg\")'>";
echo "&nbsp;<input type=button value='Quit' onclick='prc(\"quit&rig=$rig\",\"Quit sgminer$rg\")'>";
}
refreshbuttons();
if (isset($_SESSION[$ses]))
Expand Down Expand Up @@ -1881,7 +1881,7 @@ function doOne($rig, $preprocess)
if ($notify)
$cmds['notify'] = 'device status';

$cmds['config'] = 'cgminer config';
$cmds['config'] = 'sgminer config';

process($cmds, $rig);

Expand Down
4 changes: 2 additions & 2 deletions ocl.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ char *file_contents(const char *filename, int *length)
/* Try in the optional kernel path or installed prefix first */
f = fopen(fullpath, "rb");
if (!f) {
/* Then try from the path cgminer was called */
strcpy(fullpath, cgminer_path);
/* Then try from the path sgminer was called */
strcpy(fullpath, sgminer_path);
strcat(fullpath, filename);
f = fopen(fullpath, "rb");
}
Expand Down
Loading

0 comments on commit 50066cf

Please sign in to comment.